public function ContentAwareGeneratorTest::testGenerateDocumentMultilangLocaleNomatch 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::testGenerateDocumentMultilangLocaleNomatch()
File
- vendor/
symfony-cmf/ routing/ Tests/ Routing/ ContentAwareGeneratorTest.php, line 265
Class
Namespace
Symfony\Cmf\Component\Routing\Tests\RoutingCode
public function testGenerateDocumentMultilangLocaleNomatch() {
$route_en = $this
->buildMock('Symfony\\Cmf\\Component\\Routing\\Tests\\Routing\\RouteMock', array(
'getDefaults',
'compile',
));
$route_en
->setLocale('en');
$route_de = $this->routeDocument;
$route_de
->setLocale('de');
$this->contentDocument
->expects($this
->once())
->method('getRoutes')
->will($this
->returnValue(array(
$route_en,
$route_de,
)));
$route_en
->expects($this
->once())
->method('compile')
->will($this
->returnValue($this->routeCompiled));
$route_de
->expects($this
->never())
->method('compile');
$this
->assertEquals('result_url', $this->generator
->generate($this->contentDocument, array(
'_locale' => 'fr',
)));
}