diff --git a/tests/Symfony/Tests/Component/Routing/Annotation/RouteTest.php b/tests/Symfony/Tests/Component/Routing/Annotation/RouteTest.php index 4ef8fbab50..bca54795a4 100644 --- a/tests/Symfony/Tests/Component/Routing/Annotation/RouteTest.php +++ b/tests/Symfony/Tests/Component/Routing/Annotation/RouteTest.php @@ -37,7 +37,7 @@ class RouteTest extends \PHPUnit_Framework_TestCase return array( array('value', '/Blog', 'getPattern'), array('requirements', array('_method' => 'GET'), 'getRequirements'), - array('options', array('segment_separators' => array('/')), 'getOptions'), + array('options', array('compiler_class' => 'RouteCompiler'), 'getOptions'), array('name', 'blog_index', 'getName'), array('defaults', array('_controller' => 'MyBlogBundle:Blog:index'), 'getDefaults') ); diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidroute.xml b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidroute.xml index 7be82e53c3..cba82f3d29 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidroute.xml +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/nonvalidroute.xml @@ -7,7 +7,7 @@ MyBundle:Blog:show GET - + baz diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.php b/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.php index d96436cb0f..0d1d3a73da 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.php +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.php @@ -3,8 +3,11 @@ use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Route; $collection = new RouteCollection(); -$collection->add('blog_show', new Route('/blog/{slug}', array( - '_controller' => 'MyBlogBundle:Blog:show', -))); +$collection->add('blog_show', new Route( + '/blog/{slug}', + array('_controller' => 'MyBlogBundle:Blog:show'), + array(), + array('compiler_class' => 'RouteCompiler') +)); return $collection; diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.xml b/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.xml index 2437ef97b5..fdb38073a0 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.xml +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.xml @@ -7,6 +7,6 @@ MyBundle:Blog:show GET - + diff --git a/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.yml b/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.yml index 8d79b2b276..e645d9b6ec 100644 --- a/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.yml +++ b/tests/Symfony/Tests/Component/Routing/Fixtures/validpattern.yml @@ -1,4 +1,6 @@ blog_show: pattern: /blog/{slug} defaults: { _controller: MyBlogBundle:Blog:show } + options: + compiler_class: RouteCompiler diff --git a/tests/Symfony/Tests/Component/Routing/Loader/PhpFileLoaderTest.php b/tests/Symfony/Tests/Component/Routing/Loader/PhpFileLoaderTest.php index b2b3607864..c38fe6657a 100644 --- a/tests/Symfony/Tests/Component/Routing/Loader/PhpFileLoaderTest.php +++ b/tests/Symfony/Tests/Component/Routing/Loader/PhpFileLoaderTest.php @@ -39,6 +39,8 @@ class PhpFileLoaderTest extends \PHPUnit_Framework_TestCase $this->assertEquals(1, count($routes), 'One route is loaded'); $this->assertContainsOnly('Symfony\Component\Routing\Route', $routes); + $route = $routes['blog_show']; + $this->assertEquals('RouteCompiler', $route->getOption('compiler_class')); } } diff --git a/tests/Symfony/Tests/Component/Routing/Loader/XmlFileLoaderTest.php b/tests/Symfony/Tests/Component/Routing/Loader/XmlFileLoaderTest.php index adb62fab41..f6bca7832e 100644 --- a/tests/Symfony/Tests/Component/Routing/Loader/XmlFileLoaderTest.php +++ b/tests/Symfony/Tests/Component/Routing/Loader/XmlFileLoaderTest.php @@ -39,6 +39,8 @@ class XmlFileLoaderTest extends \PHPUnit_Framework_TestCase $this->assertEquals(1, count($routes), 'One route is loaded'); $this->assertContainsOnly('Symfony\Component\Routing\Route', $routes); + $route = $routes['blog_show']; + $this->assertEquals('RouteCompiler', $route->getOption('compiler_class')); } public function testLoadWithImport() diff --git a/tests/Symfony/Tests/Component/Routing/Loader/YamlFileLoaderTest.php b/tests/Symfony/Tests/Component/Routing/Loader/YamlFileLoaderTest.php index 834fad8438..0bfbd64a07 100644 --- a/tests/Symfony/Tests/Component/Routing/Loader/YamlFileLoaderTest.php +++ b/tests/Symfony/Tests/Component/Routing/Loader/YamlFileLoaderTest.php @@ -76,6 +76,8 @@ class YamlFileLoaderTest extends \PHPUnit_Framework_TestCase $this->assertEquals(1, count($routes), 'One route is loaded'); $this->assertContainsOnly('Symfony\Component\Routing\Route', $routes); + $route = $routes['blog_show']; + $this->assertEquals('RouteCompiler', $route->getOption('compiler_class')); } public function testLoadWithResource()