public function PHPUnit_Framework_MockObject_Matcher::toString in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php \PHPUnit_Framework_MockObject_Matcher::toString()
Return value
string
Overrides PHPUnit_Framework_SelfDescribing::toString
File
- vendor/
phpunit/ phpunit-mock-objects/ src/ Framework/ MockObject/ Matcher.php, line 65
Class
- PHPUnit_Framework_MockObject_Matcher
- Main matcher which defines a full expectation using method, parameter and invocation matchers. This matcher encapsulates all the other matchers and allows the builder to set the specific matchers when the appropriate methods are called…
Code
public function toString() {
$list = array();
if ($this->invocationMatcher !== null) {
$list[] = $this->invocationMatcher
->toString();
}
if ($this->methodNameMatcher !== null) {
$list[] = 'where ' . $this->methodNameMatcher
->toString();
}
if ($this->parametersMatcher !== null) {
$list[] = 'and ' . $this->parametersMatcher
->toString();
}
if ($this->afterMatchBuilderId !== null) {
$list[] = 'after ' . $this->afterMatchBuilderId;
}
if ($this->stub !== null) {
$list[] = 'will ' . $this->stub
->toString();
}
return implode(' ', $list);
}