You are here

public function UrlGeneratorTest::testEncodingOfRelativePathSegments in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/routing/Tests/Generator/UrlGeneratorTest.php \Symfony\Component\Routing\Tests\Generator\UrlGeneratorTest::testEncodingOfRelativePathSegments()

File

vendor/symfony/routing/Tests/Generator/UrlGeneratorTest.php, line 330

Class

UrlGeneratorTest

Namespace

Symfony\Component\Routing\Tests\Generator

Code

public function testEncodingOfRelativePathSegments() {
  $routes = $this
    ->getRoutes('test', new Route('/dir/../dir/..'));
  $this
    ->assertSame('/app.php/dir/%2E%2E/dir/%2E%2E', $this
    ->getGenerator($routes)
    ->generate('test'));
  $routes = $this
    ->getRoutes('test', new Route('/dir/./dir/.'));
  $this
    ->assertSame('/app.php/dir/%2E/dir/%2E', $this
    ->getGenerator($routes)
    ->generate('test'));
  $routes = $this
    ->getRoutes('test', new Route('/a./.a/a../..a/...'));
  $this
    ->assertSame('/app.php/a./.a/a../..a/...', $this
    ->getGenerator($routes)
    ->generate('test'));
}