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