diff --git a/create_framework/unit-testing.rst b/create_framework/unit-testing.rst index b34b3a76e2d..de26e202570 100644 --- a/create_framework/unit-testing.rst +++ b/create_framework/unit-testing.rst @@ -96,6 +96,11 @@ We are now ready to write our first test:: ->method('match') ->will($this->throwException($exception)) ; + $matcher + ->expects($this->once()) + ->method('getContext') + ->will($this->returnValue($this->getMock('Symfony\Component\Routing\RequestContext'))) + ; $resolver = $this->getMock('Symfony\Component\HttpKernel\Controller\ControllerResolverInterface'); return new Framework($matcher, $resolver);