@@ 40-53 (lines=14) @@ | ||
37 | $this->shouldImplement(LocationTransformerInterface::class); |
|
38 | } |
|
39 | ||
40 | function it_will_return_null_for_unknown_routes( |
|
41 | RouterContainer $router, |
|
42 | Generator $generator |
|
43 | ) |
|
44 | { |
|
45 | $router->getGenerator()->willReturn($generator); |
|
46 | $this->beConstructedWith($router); |
|
47 | ||
48 | $generator->generate('test', []) |
|
49 | ->shouldBeCalled() |
|
50 | ->willThrow(new RouteNotFound()); |
|
51 | ||
52 | $this->transform('test')->shouldBeNull(); |
|
53 | } |
|
54 | ||
55 | function it_sets_the_uri_path_form_router_container( |
|
56 | RouterContainer $router, |
|
@@ 55-68 (lines=14) @@ | ||
52 | $this->transform('test')->shouldBeNull(); |
|
53 | } |
|
54 | ||
55 | function it_sets_the_uri_path_form_router_container( |
|
56 | RouterContainer $router, |
|
57 | Generator $generator |
|
58 | ) |
|
59 | { |
|
60 | $router->getGenerator()->willReturn($generator); |
|
61 | $this->beConstructedWith($router); |
|
62 | ||
63 | $generator->generate('about', []) |
|
64 | ->shouldBeCalled() |
|
65 | ->willReturn('/pages/about'); |
|
66 | ||
67 | $this->transform('about')->shouldBeAnUriWithPath('/pages/about'); |
|
68 | } |
|
69 | ||
70 | function it_accepts_query_params_in_options( |
|
71 | ServerRequestInterface $request, |