use Symfony\Component\DependencyInjection\Exception\RuntimeException;
use Symfony\Component\Routing\Loader\YamlFileLoader;
use Symfony\Component\Routing\Route;
use Symfony\Component\Routing\RouteCollection;
class RouterTest extends TestCase
{ public function testConstructThrowsOnNonSymfonyNorPsr11Container() { $this->
expectException(\LogicException::
class);
$this->
expectExceptionMessage('You should either pass a "Symfony\Component\DependencyInjection\ContainerInterface" instance or provide the $parameters argument of the "Symfony\Bundle\FrameworkBundle\Routing\Router::__construct" method'
);
new Router($this->
createMock(ContainerInterface::
class), 'foo'
);
} public function testGenerateWithServiceParam() { $routes =
new RouteCollection();
$routes->
add('foo',
new Route( ' /{_locale}',
[ '_locale' => '%locale%',
],
[