PHPUnit_Framework_MockObject_MockBuilder
in package
Implementation of the Builder pattern for Mock objects.
Tags
Table of Contents
- $autoload : bool
- $callOriginalMethods : bool
- $cloneArguments : bool
- $constructorArgs : array<string|int, mixed>
- $methods : array<string|int, mixed>
- $mockClassName : string
- $originalClone : bool
- $originalConstructor : bool
- $proxyTarget : object
- $testCase : PHPUnit_Framework_TestCase
- $type : string
- __construct() : mixed
- disableArgumentCloning() : PHPUnit_Framework_MockObject_MockBuilder
- Disables the cloning of arguments passed to mocked methods.
- disableAutoload() : PHPUnit_Framework_MockObject_MockBuilder
- Disables the use of class autoloading while creating the mock object.
- disableOriginalClone() : PHPUnit_Framework_MockObject_MockBuilder
- Disables the invocation of the original clone constructor.
- disableOriginalConstructor() : PHPUnit_Framework_MockObject_MockBuilder
- Disables the invocation of the original constructor.
- disableProxyingToOriginalMethods() : PHPUnit_Framework_MockObject_MockBuilder
- Disables the invocation of the original methods.
- enableArgumentCloning() : PHPUnit_Framework_MockObject_MockBuilder
- Enables the cloning of arguments passed to mocked methods.
- enableAutoload() : PHPUnit_Framework_MockObject_MockBuilder
- Enables the use of class autoloading while creating the mock object.
- enableOriginalClone() : PHPUnit_Framework_MockObject_MockBuilder
- Enables the invocation of the original clone constructor.
- enableOriginalConstructor() : PHPUnit_Framework_MockObject_MockBuilder
- Enables the invocation of the original constructor.
- enableProxyingToOriginalMethods() : PHPUnit_Framework_MockObject_MockBuilder
- Enables the invocation of the original methods.
- getMock() : PHPUnit_Framework_MockObject_MockObject
- Creates a mock object using a fluent interface.
- getMockForAbstractClass() : PHPUnit_Framework_MockObject_MockObject
- Creates a mock object for an abstract class using a fluent interface.
- getMockForTrait() : PHPUnit_Framework_MockObject_MockObject
- Creates a mock object for a trait using a fluent interface.
- setConstructorArgs() : PHPUnit_Framework_MockObject_MockBuilder
- Specifies the arguments for the constructor.
- setMethods() : PHPUnit_Framework_MockObject_MockBuilder
- Specifies the subset of methods to mock. Default is to mock all of them.
- setMockClassName() : PHPUnit_Framework_MockObject_MockBuilder
- Specifies the name for the mock class.
- setProxyTarget() : PHPUnit_Framework_MockObject_MockBuilder
- Sets the proxy target.
Properties
$autoload
private
bool
$autoload
= rue
$callOriginalMethods
private
bool
$callOriginalMethods
= alse
$cloneArguments
private
bool
$cloneArguments
= alse
$constructorArgs
private
array<string|int, mixed>
$constructorArgs
= array()
$methods
private
array<string|int, mixed>
$methods
= array()
$mockClassName
private
string
$mockClassName
= ''
$originalClone
private
bool
$originalClone
= rue
$originalConstructor
private
bool
$originalConstructor
= rue
$proxyTarget
private
object
$proxyTarget
=
ull
$testCase
private
PHPUnit_Framework_TestCase
$testCase
$type
private
string
$type
Methods
__construct()
public
__construct(PHPUnit_Framework_TestCase $testCase, array<string|int, mixed>|string $type) : mixed
Parameters
- $testCase : PHPUnit_Framework_TestCase
- $type : array<string|int, mixed>|string
Return values
mixed —disableArgumentCloning()
Disables the cloning of arguments passed to mocked methods.
public
disableArgumentCloning() : PHPUnit_Framework_MockObject_MockBuilder
Tags
Return values
PHPUnit_Framework_MockObject_MockBuilder —disableAutoload()
Disables the use of class autoloading while creating the mock object.
public
disableAutoload() : PHPUnit_Framework_MockObject_MockBuilder
Return values
PHPUnit_Framework_MockObject_MockBuilder —disableOriginalClone()
Disables the invocation of the original clone constructor.
public
disableOriginalClone() : PHPUnit_Framework_MockObject_MockBuilder
Return values
PHPUnit_Framework_MockObject_MockBuilder —disableOriginalConstructor()
Disables the invocation of the original constructor.
public
disableOriginalConstructor() : PHPUnit_Framework_MockObject_MockBuilder
Return values
PHPUnit_Framework_MockObject_MockBuilder —disableProxyingToOriginalMethods()
Disables the invocation of the original methods.
public
disableProxyingToOriginalMethods() : PHPUnit_Framework_MockObject_MockBuilder
Tags
Return values
PHPUnit_Framework_MockObject_MockBuilder —enableArgumentCloning()
Enables the cloning of arguments passed to mocked methods.
public
enableArgumentCloning() : PHPUnit_Framework_MockObject_MockBuilder
Tags
Return values
PHPUnit_Framework_MockObject_MockBuilder —enableAutoload()
Enables the use of class autoloading while creating the mock object.
public
enableAutoload() : PHPUnit_Framework_MockObject_MockBuilder
Tags
Return values
PHPUnit_Framework_MockObject_MockBuilder —enableOriginalClone()
Enables the invocation of the original clone constructor.
public
enableOriginalClone() : PHPUnit_Framework_MockObject_MockBuilder
Tags
Return values
PHPUnit_Framework_MockObject_MockBuilder —enableOriginalConstructor()
Enables the invocation of the original constructor.
public
enableOriginalConstructor() : PHPUnit_Framework_MockObject_MockBuilder
Tags
Return values
PHPUnit_Framework_MockObject_MockBuilder —enableProxyingToOriginalMethods()
Enables the invocation of the original methods.
public
enableProxyingToOriginalMethods() : PHPUnit_Framework_MockObject_MockBuilder
Tags
Return values
PHPUnit_Framework_MockObject_MockBuilder —getMock()
Creates a mock object using a fluent interface.
public
getMock() : PHPUnit_Framework_MockObject_MockObject
Return values
PHPUnit_Framework_MockObject_MockObject —getMockForAbstractClass()
Creates a mock object for an abstract class using a fluent interface.
public
getMockForAbstractClass() : PHPUnit_Framework_MockObject_MockObject
Return values
PHPUnit_Framework_MockObject_MockObject —getMockForTrait()
Creates a mock object for a trait using a fluent interface.
public
getMockForTrait() : PHPUnit_Framework_MockObject_MockObject
Return values
PHPUnit_Framework_MockObject_MockObject —setConstructorArgs()
Specifies the arguments for the constructor.
public
setConstructorArgs(array<string|int, mixed> $args) : PHPUnit_Framework_MockObject_MockBuilder
Parameters
- $args : array<string|int, mixed>
Return values
PHPUnit_Framework_MockObject_MockBuilder —setMethods()
Specifies the subset of methods to mock. Default is to mock all of them.
public
setMethods(array<string|int, mixed>|null $methods) : PHPUnit_Framework_MockObject_MockBuilder
Parameters
- $methods : array<string|int, mixed>|null
Return values
PHPUnit_Framework_MockObject_MockBuilder —setMockClassName()
Specifies the name for the mock class.
public
setMockClassName(string $name) : PHPUnit_Framework_MockObject_MockBuilder
Parameters
- $name : string
Return values
PHPUnit_Framework_MockObject_MockBuilder —setProxyTarget()
Sets the proxy target.
public
setProxyTarget(object $object) : PHPUnit_Framework_MockObject_MockBuilder
Parameters
- $object : object