You are here

public function ContentAwareGeneratorTest::testGenerateRouteMultilangDefaultLocale in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 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

ContentAwareGeneratorTest

Namespace

Symfony\Cmf\Component\Routing\Tests\Routing

Code

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',
  )));
}