| @@ 78-91 (lines=14) @@ | ||
| 75 | /** |
|
| 76 | * |
|
| 77 | */ |
|
| 78 | public function testLoadFileNoCacheWithVars() |
|
| 79 | { |
|
| 80 | $this->router->expects($this->once()) |
|
| 81 | ->method('isCached') |
|
| 82 | ->willReturn(false); |
|
| 83 | ||
| 84 | $routes = $this->loader->loadFile($this->file); |
|
| 85 | $route = $routes->current(); |
|
| 86 | $handler = $route->getHandler(); |
|
| 87 | ||
| 88 | $expected = 'my-var'; |
|
| 89 | $actual = $handler(); |
|
| 90 | $this->assertEquals($expected, $actual); |
|
| 91 | } |
|
| 92 | ||
| 93 | /** |
|
| 94 | * |
|
| @@ 74-88 (lines=15) @@ | ||
| 71 | /** |
|
| 72 | * |
|
| 73 | */ |
|
| 74 | public function testLoadFileNoCache() |
|
| 75 | { |
|
| 76 | $this->router->expects($this->once()) |
|
| 77 | ->method('isCached') |
|
| 78 | ->willReturn(false); |
|
| 79 | ||
| 80 | $collection = $this->loader->loadFile($this->file); |
|
| 81 | $route = $collection->current(); |
|
| 82 | ||
| 83 | $expected = 'myHandler::myMethod'; |
|
| 84 | $actual = $route->getHandler(); |
|
| 85 | ||
| 86 | $this->assertInstanceOf(RouteCollectionInterface::class, $collection); |
|
| 87 | $this->assertEquals($expected, $actual); |
|
| 88 | } |
|
| 89 | ||
| 90 | /** |
|
| 91 | * |
|