Returns a mock object for the specified class.
param : ...
return : PHPUnit_Framework_MockObject_MockObject
PHPUnit_Framework_MockObject_MockObject getMock (string $originalClassName [, mixed $methods = array() [, array $arguments = array() [, string $mockClassName = '' [, bool $callOriginalConstructor = TRUE [, bool $callOriginalClone = TRUE [, bool $callAutoload = TRUE]]]]]])
$this->getMock(
$originalClassName,
$methods = array(),
array $arguments = array(),
$mockClassName = '',
$callOriginalConstructor = TRUE,
$callOriginalClone = TRUE,
$callAutoload = TRUE
);
getMockForAbstractClass()
Returns a mock object for the specified abstract class with all abstract methods of the class mocked. Concrete methods to mock can be specified with the last parameter.
param : ...
return : PHPUnit_Framework_MockObject_MockObject
PHPUnit_Framework_MockObject_MockObject getMockForAbstractClass (string $originalClassName [, array $arguments = array() [, string $mockClassName = '' [, bool $callOriginalConstructor = TRUE [, bool $callOriginalClone = TRUE [, bool $callAutoload = TRUE [, array $mockedMethods = array()]]]]]])
$this->getMockForAbstractClass(
$originalClassName,
array $arguments = array(),
$mockClassName = '',
$callOriginalConstructor = TRUE,
$callOriginalClone = TRUE,
$callAutoload = TRUE,
array $mockedMethods
);
Returns a mock object based on the given WSDL file.
param : ...
return : PHPUnit_Framework_MockObject_MockObject
PHPUnit_Framework_MockObject_MockObject getMockFromWsdl (string $wsdlFile [, string $originalClassName [, string $mockClassName = '' [, array $mockedMethods = array() [, bool $callOriginalConstructor = TRUE]]]])
$this->getMockFromWsdl(
$wsdlFile,
$originalClassName = '',
$mockClassName = '',
array $methods = array(),
$callOriginalConstructor = TRUE
);
Returns a builder object to create mock objects using a fluent interface.
param : string
return : PHPUnit_Framework_MockObject_MockBuilder
PHPUnit_Framework_MockObject_MockBuilder getMockBuilder (string $className )
$mock = $this->getMockBuilder($className)
->setMockClassName($name)
->setConstructorArgs(array())
->disableOriginalConstructor()
->disableOriginalClone()
->disableAutoload()
->setMethods(array()|NULL)
->getMock();
$mock = $this->getMockBuilder($className)
->setMockClassName($name)
->setConstructorArgs(array())
->disableOriginalConstructor()
->disableOriginalClone()
->disableAutoload()
->setMethods(array()|NULL)
->getMockForAbstractClass();