TestStubBuilder
final class TestStubBuilder extends TestDoubleBuilder (View source)
Properties
| protected class-string|trait-string | $type | from TestDoubleBuilder | |
| protected list<non-empty-string> | $methods | from TestDoubleBuilder | |
| protected bool | $emptyMethodsArray | from TestDoubleBuilder | |
| protected array | $constructorArgs | from TestDoubleBuilder | |
| protected bool | $originalConstructor | from TestDoubleBuilder | |
| protected bool | $originalClone | from TestDoubleBuilder | |
| protected bool | $returnValueGeneration | from TestDoubleBuilder |
Methods
Specifies the subset of methods to mock, requiring each to exist in the class.
Specifies the arguments for the constructor.
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.
No description
Specifies the name for the mock class.
Details
__construct(string $type)
No description
TestDoubleBuilder
onlyMethods(array $methods)
Specifies the subset of methods to mock, requiring each to exist in the class.
TestDoubleBuilder
setConstructorArgs(array $arguments)
Specifies the arguments for the constructor.
TestDoubleBuilder
disableOriginalConstructor()
Disables the invocation of the original constructor.
TestDoubleBuilder
enableOriginalConstructor()
Enables the invocation of the original constructor.
TestDoubleBuilder
disableOriginalClone()
Disables the invocation of the original clone constructor.
TestDoubleBuilder
enableOriginalClone()
Enables the invocation of the original clone constructor.
TestDoubleBuilder
enableAutoReturnValueGeneration()
No description
TestDoubleBuilder
disableAutoReturnValueGeneration()
No description
protected MockObject|Stub
getTestDouble(string|null $testDoubleClassName, bool $mockObject)
No description
Stub
getStub()
Creates a test stub using a fluent interface.
TestStubBuilder
setStubClassName(string $name)
Specifies the name for the mock class.