| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | public function testGenerateRoutes() |
||
| 10 | { |
||
| 11 | $client = static::createClient(array('environment' => 'twig')); |
||
| 12 | $pathHelper = new PathHelper($client->getContainer()); |
||
|
|
|||
| 13 | |||
| 14 | // test route is defined in Tests/app/routing.yml |
||
| 15 | $routes = $pathHelper->generateRoutes(['test_route' => []]); |
||
| 16 | |||
| 17 | $this->assertEquals(['api.test_route = "/monitor";'], $routes); |
||
| 18 | } |
||
| 19 | } |
||
| 20 |
Unless you are absolutely sure that the expression can never be null because of other conditions, we strongly recommend to add an additional type check to your code: