PHPUnit_Framework_MockObject_MockBuilder
class PHPUnit_Framework_MockObject_MockBuilder (View source)
Implementation of the Builder pattern for Mock objects.
Methods
No description
Creates a mock object using a fluent interface.
Creates a mock object for an abstract class using a fluent interface.
Creates a mock object for a trait using a fluent interface.
Specifies the subset of methods to mock. Default is to mock all of them.
Specifies the subset of methods to not mock. Default is to mock all of them.
Specifies the arguments for the constructor.
Specifies the name for the mock class.
Disables the invocation of the original constructor.
Enables the invocation of the original constructor.
Disables the invocation of the original clone constructor.
Enables the invocation of the original clone constructor.
Disables the use of class autoloading while creating the mock object.
Enables the use of class autoloading while creating the mock object.
Disables the cloning of arguments passed to mocked methods.
Enables the cloning of arguments passed to mocked methods.
Enables the invocation of the original methods.
Disables the invocation of the original methods.
Sets the proxy target.
No description
No description
Details
at line 92
__construct(TestCase $testCase, array|string $type)
at line 104
PHPUnit_Framework_MockObject_MockObject
getMock()
Creates a mock object using a fluent interface.
at line 130
PHPUnit_Framework_MockObject_MockObject
getMockForAbstractClass()
Creates a mock object for an abstract class using a fluent interface.
at line 153
PHPUnit_Framework_MockObject_MockObject
getMockForTrait()
Creates a mock object for a trait using a fluent interface.
at line 178
PHPUnit_Framework_MockObject_MockBuilder
setMethods(array $methods = null)
Specifies the subset of methods to mock. Default is to mock all of them.
at line 192
PHPUnit_Framework_MockObject_MockBuilder
setMethodsExcept(array $methods = [])
Specifies the subset of methods to not mock. Default is to mock all of them.
at line 213
PHPUnit_Framework_MockObject_MockBuilder
setConstructorArgs(array $args)
Specifies the arguments for the constructor.
at line 227
PHPUnit_Framework_MockObject_MockBuilder
setMockClassName(string $name)
Specifies the name for the mock class.
at line 239
PHPUnit_Framework_MockObject_MockBuilder
disableOriginalConstructor()
Disables the invocation of the original constructor.
at line 251
PHPUnit_Framework_MockObject_MockBuilder
enableOriginalConstructor()
Enables the invocation of the original constructor.
at line 263
PHPUnit_Framework_MockObject_MockBuilder
disableOriginalClone()
Disables the invocation of the original clone constructor.
at line 275
PHPUnit_Framework_MockObject_MockBuilder
enableOriginalClone()
Enables the invocation of the original clone constructor.
at line 287
PHPUnit_Framework_MockObject_MockBuilder
disableAutoload()
Disables the use of class autoloading while creating the mock object.
at line 299
PHPUnit_Framework_MockObject_MockBuilder
enableAutoload()
Enables the use of class autoloading while creating the mock object.
at line 311
PHPUnit_Framework_MockObject_MockBuilder
disableArgumentCloning()
Disables the cloning of arguments passed to mocked methods.
at line 323
PHPUnit_Framework_MockObject_MockBuilder
enableArgumentCloning()
Enables the cloning of arguments passed to mocked methods.
at line 335
PHPUnit_Framework_MockObject_MockBuilder
enableProxyingToOriginalMethods()
Enables the invocation of the original methods.
at line 347
PHPUnit_Framework_MockObject_MockBuilder
disableProxyingToOriginalMethods()
Disables the invocation of the original methods.
at line 362
PHPUnit_Framework_MockObject_MockBuilder
setProxyTarget(object $object)
Sets the proxy target.