public function PHPUnit_Framework_MockObject_Builder_InvocationMocker::method in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php \PHPUnit_Framework_MockObject_Builder_InvocationMocker::method()
Parameters
PHPUnit_Framework_Constraint|string $constraint:
Return value
PHPUnit_Framework_MockObject_Builder_InvocationMocker
Overrides PHPUnit_Framework_MockObject_Builder_MethodNameMatch::method
File
- vendor/
phpunit/ phpunit-mock-objects/ src/ Framework/ MockObject/ Builder/ InvocationMocker.php, line 243
Class
- PHPUnit_Framework_MockObject_Builder_InvocationMocker
- Builder for mocked or stubbed invocations.
Code
public function method($constraint) {
if ($this->matcher->methodNameMatcher !== null) {
throw new PHPUnit_Framework_Exception('Method name matcher is already defined, cannot redefine');
}
$this->matcher->methodNameMatcher = new PHPUnit_Framework_MockObject_Matcher_MethodName($constraint);
return $this;
}