/** * Runs the matcher with $actual, and throws an exception if the xor of the * returned value and $inverse is false. * * @param MatcherInterface $matcher * @returns Expectation The current expectation * @throws ExpectationException If the positive or negative match fails */ private function test($matcher) { $match = $matcher->match($this->actual); if (!($this->inverse xor $match)) { $failureMessage = $matcher->getFailureMessage($this->inverse); throw new ExpectationException($failureMessage); } }
/** * 生成特定路由的url * * @param RouteInterface $route * @param array $parameters * @param boolean $absolute * @return string */ function match($path) { $route = $this->_matcher->match($path, $this->_routes); return $route; }