@@ -49,7 +49,8 @@ resolver. Modify the framework to make use of them::
4949 namespace Simplex;
5050
5151 // ...
52-
52+
53+ use Calendar\Controller\LeapYearController;
5354 use Symfony\Component\HttpKernel\Controller\ArgumentResolverInterface;
5455 use Symfony\Component\HttpKernel\Controller\ControllerResolverInterface;
5556 use Symfony\Component\Routing\Matcher\UrlMatcherInterface;
@@ -125,7 +126,7 @@ Execute this test by running ``phpunit`` in the ``example.com`` directory:
125126
126127.. code-block :: terminal
127128
128- $ phpunit
129+ $ ./vendor/bin/ phpunit
129130
130131 .. note ::
131132
@@ -164,11 +165,9 @@ Response::
164165 ->expects($this->once())
165166 ->method('match')
166167 ->will($this->returnValue([
167- '_route' => 'foo',
168- 'name' => 'Fabien',
169- '_controller' => function ($name) {
170- return new Response('Hello '.$name);
171- }
168+ '_route' => 'is_leap_year/{year}',
169+ 'year' => '2000',
170+ '_controller' => [new LeapYearController(), 'index']
172171 ]))
173172 ;
174173 $matcher
@@ -196,7 +195,7 @@ coverage feature (you need to enable `XDebug`_ first):
196195
197196.. code-block :: terminal
198197
199- $ phpunit --coverage-html=cov/
198+ $ ./vendor/bin/ phpunit --coverage-html=cov/
200199
201200 Open ``example.com/cov/src/Simplex/Framework.php.html `` in a browser and check
202201that all the lines for the Framework class are green (it means that they have
@@ -206,7 +205,7 @@ Alternatively you can output the result directly to the console:
206205
207206.. code-block :: terminal
208207
209- $ phpunit --coverage-text
208+ $ ./vendor/bin/ phpunit --coverage-text
210209
211210 Thanks to the clean object-oriented code that we have written so far, we have
212211been able to write unit-tests to cover all possible use cases of our
0 commit comments