| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function testGenerateRoutes() |
||
| 11 | { |
||
| 12 | $client = static::createClient(array('environment' => 'symfony' . Kernel::MAJOR_VERSION)); |
||
| 13 | |||
| 14 | $container = $client->getContainer(); |
||
| 15 | |||
| 16 | $pathHelper = new PathHelper($container); |
||
|
|
|||
| 17 | |||
| 18 | // test route is defined in Tests/app/routing.yml |
||
| 19 | $routes = $pathHelper->generateRoutes(['test_route' => []]); |
||
| 20 | |||
| 21 | $this->assertEquals(['api.test_route = "/monitor";'], $routes); |
||
| 22 | } |
||
| 23 | } |
||
| 24 |
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: