Procházet zdrojové kódy

Revert "fixed tests"

This reverts commit 7dc3af603671a2f860316da6517228c6a2771c77.
Fabien Potencier před 14 roky
rodič
revize
544b6ca6aa

+ 0 - 12
tests/Symfony/Tests/Component/Routing/Fixtures/dumper/url_matcher1.php

@@ -117,18 +117,6 @@ class ProjectUrlMatcher extends Symfony\Component\Routing\Matcher\UrlMatcher
     
         }
 
-        // foo
-        if (preg_match('#^/(?P<_locale>[^/]+?)/b/(?P<foo>[^/]+?)$#x', $pathinfo, $matches)) {
-            $matches['_route'] = 'foo';
-            return $matches;
-        }
-
-        // bar
-        if (preg_match('#^/(?P<_locale>[^/]+?)/b/(?P<bar>[^/]+?)$#x', $pathinfo, $matches)) {
-            $matches['_route'] = 'bar';
-            return $matches;
-        }
-
         throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
     }
 }

+ 0 - 8
tests/Symfony/Tests/Component/Routing/Matcher/Dumper/PhpMatcherDumperTest.php

@@ -82,14 +82,6 @@ class PhpMatcherDumperTest extends \PHPUnit_Framework_TestCase
         $collection2->addCollection($collection1, '/b');
         $collection->addCollection($collection2, '/a');
 
-        // "dynamic" prefix
-        $collection1 = new RouteCollection();
-        $collection1->add('foo', new Route('/{foo}'));
-        $collection1->add('bar', new Route('/{bar}'));
-        $collection2 = new RouteCollection();
-        $collection2->addCollection($collection1, '/b');
-        $collection->addCollection($collection2, '/{_locale}');
-
         $dumper = new PhpMatcherDumper($collection, new RequestContext());
         $this->assertStringEqualsFile(__DIR__.'/../../Fixtures/dumper/url_matcher1.php', $dumper->dump(), '->dump() dumps basic routes to the correct PHP file.');