PHPUnit_Framework_TestCase:: getMockForTrait
Returns a mock object for the specified trait with all abstract methods of the trait mocked. Concrete methods to mock can be specified with the `$mockedMethods` parameter.
Signature
public function getMockForTrait(string
$traitName,
[array
$arguments = '',
[string
$mockClassName = '',
[boolean
$callOriginalConstructor = true,
[boolean
$callOriginalClone = true,
[boolean
$callAutoload = true,
[array
$mockedMethods = false,
[boolean
$cloneArguments = false]]]]]]] )
Parameters
$traitName
—
string
$arguments
—
array
$mockClassName
—
string
$callOriginalConstructor
—
boolean
$callOriginalClone
—
boolean
$callAutoload
—
boolean
$mockedMethods
—
array
$cloneArguments
—
boolean
Returns
PHPUnit_Framework_MockObject_MockObject
Errors/Exceptions
PHPUnit_Framework_Exception
Violations
Checkstyle
Line
Column
Severity
Message
1416
230
warning
Line exceeds 120 characters; contains 229 characters