protected function getRequestMatcherMock()
{
$mock = $this->getMock('Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface');
if ($this->matchRequestResult instanceof Exception) {
$mock->expects($this->any())->method('matchRequest')->will($this->throwException($this->matchRequestResult));
} elseif ($this->matchRequestResult === false) {
$mock->expects($this->never())->method('matchRequest');
} else {
$mock->expects($this->any())->method('matchRequest')->will($this->returnValue($this->matchRequestResult));
}
return $mock;
}