mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-11 01:14:06 +09:00
Update composer dependencies
This commit is contained in:
44
vendor/symfony/routing/Tests/RouterTest.php
vendored
44
vendor/symfony/routing/Tests/RouterTest.php
vendored
@@ -30,11 +30,11 @@ class RouterTest extends TestCase
|
||||
|
||||
public function testSetOptionsWithSupportedOptions()
|
||||
{
|
||||
$this->router->setOptions(array(
|
||||
$this->router->setOptions([
|
||||
'cache_dir' => './cache',
|
||||
'debug' => true,
|
||||
'resource_type' => 'ResourceType',
|
||||
));
|
||||
]);
|
||||
|
||||
$this->assertSame('./cache', $this->router->getOption('cache_dir'));
|
||||
$this->assertTrue($this->router->getOption('debug'));
|
||||
@@ -47,12 +47,12 @@ class RouterTest extends TestCase
|
||||
*/
|
||||
public function testSetOptionsWithUnsupportedOptions()
|
||||
{
|
||||
$this->router->setOptions(array(
|
||||
$this->router->setOptions([
|
||||
'cache_dir' => './cache',
|
||||
'option_foo' => true,
|
||||
'option_bar' => 'baz',
|
||||
'resource_type' => 'ResourceType',
|
||||
));
|
||||
]);
|
||||
}
|
||||
|
||||
public function testSetOptionWithSupportedOption()
|
||||
@@ -88,55 +88,33 @@ class RouterTest extends TestCase
|
||||
|
||||
$this->loader->expects($this->once())
|
||||
->method('load')->with('routing.yml', 'ResourceType')
|
||||
->will($this->returnValue($routeCollection));
|
||||
->willReturn($routeCollection);
|
||||
|
||||
$this->assertSame($routeCollection, $this->router->getRouteCollection());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideMatcherOptionsPreventingCaching
|
||||
*/
|
||||
public function testMatcherIsCreatedIfCacheIsNotConfigured($option)
|
||||
public function testMatcherIsCreatedIfCacheIsNotConfigured()
|
||||
{
|
||||
$this->router->setOption($option, null);
|
||||
$this->router->setOption('cache_dir', null);
|
||||
|
||||
$this->loader->expects($this->once())
|
||||
->method('load')->with('routing.yml', null)
|
||||
->will($this->returnValue(new RouteCollection()));
|
||||
->willReturn(new RouteCollection());
|
||||
|
||||
$this->assertInstanceOf('Symfony\\Component\\Routing\\Matcher\\UrlMatcher', $this->router->getMatcher());
|
||||
}
|
||||
|
||||
public function provideMatcherOptionsPreventingCaching()
|
||||
public function testGeneratorIsCreatedIfCacheIsNotConfigured()
|
||||
{
|
||||
return array(
|
||||
array('cache_dir'),
|
||||
array('matcher_cache_class'),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider provideGeneratorOptionsPreventingCaching
|
||||
*/
|
||||
public function testGeneratorIsCreatedIfCacheIsNotConfigured($option)
|
||||
{
|
||||
$this->router->setOption($option, null);
|
||||
$this->router->setOption('cache_dir', null);
|
||||
|
||||
$this->loader->expects($this->once())
|
||||
->method('load')->with('routing.yml', null)
|
||||
->will($this->returnValue(new RouteCollection()));
|
||||
->willReturn(new RouteCollection());
|
||||
|
||||
$this->assertInstanceOf('Symfony\\Component\\Routing\\Generator\\UrlGenerator', $this->router->getGenerator());
|
||||
}
|
||||
|
||||
public function provideGeneratorOptionsPreventingCaching()
|
||||
{
|
||||
return array(
|
||||
array('cache_dir'),
|
||||
array('generator_cache_class'),
|
||||
);
|
||||
}
|
||||
|
||||
public function testMatchRequestWithUrlMatcherInterface()
|
||||
{
|
||||
$matcher = $this->getMockBuilder('Symfony\Component\Routing\Matcher\UrlMatcherInterface')->getMock();
|
||||
|
||||
Reference in New Issue
Block a user