public function ContentAwareGeneratorTest::testGenerateRouteMultilangDefaultLocale in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony-cmf/routing/Tests/Routing/ContentAwareGeneratorTest.php \Symfony\Cmf\Component\Routing\Tests\Routing\ContentAwareGeneratorTest::testGenerateRouteMultilangDefaultLocale()
File
- vendor/
symfony-cmf/ routing/ Tests/ Routing/ ContentAwareGeneratorTest.php, line 132
Class
Namespace
Symfony\Cmf\Component\Routing\Tests\RoutingCode
public function testGenerateRouteMultilangDefaultLocale() {
$route = $this
->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock');
$route
->expects($this
->any())
->method('compile')
->will($this
->returnValue($this->routeCompiled));
$route
->expects($this
->any())
->method('getRequirement')
->with('_locale')
->will($this
->returnValue('de|en'));
$route
->expects($this
->any())
->method('getDefault')
->with('_locale')
->will($this
->returnValue('en'));
$this->routeCompiled
->expects($this
->any())
->method('getVariables')
->will($this
->returnValue(array()));
$this
->assertEquals('result_url', $this->generator
->generate($route, array(
'_locale' => 'en',
)));
}