| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | public function testLoadRouting($routeName, $path, array $methods) |
||
| 19 | { |
||
| 20 | $locator = new FileLocator(); |
||
| 21 | $loader = new YamlFileLoader($locator); |
||
| 22 | |||
| 23 | $collection = new RouteCollection(); |
||
| 24 | $subCollection = $loader->load(__DIR__.'/../../Resources/config/routing.yml'); |
||
| 25 | $collection->addCollection($subCollection); |
||
|
|
|||
| 26 | |||
| 27 | $route = $collection->get($routeName); |
||
| 28 | $this->assertNotNull($route, sprintf('The route "%s" should exists', $routeName)); |
||
| 29 | $this->assertSame($path, $route->getPath()); |
||
| 30 | $this->assertSame($methods, $route->getMethods()); |
||
| 31 | } |
||
| 32 | |||
| 43 |
It seems like the type of the argument is not accepted by the function/method which you are calling.
In some cases, in particular if PHP’s automatic type-juggling kicks in this might be fine. In other cases, however this might be a bug.
We suggest to add an explicit type cast like in the following example: