public function UrlGeneratorTest::testEncodingOfRelativePathSegments

File

drupal/core/vendor/symfony/routing/Symfony/Component/Routing/Tests/Generator/UrlGeneratorTest.php, line 248

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