Security update for Core, with self-updated composer
[yaffs-website] / vendor / symfony / routing / Tests / RouteTest.php
index 18c0206474a346d1addebd6ab423094a03fb3fba..b65dfb54085c14caa03a54df6202da29eeb2dd97 100644 (file)
@@ -165,24 +165,6 @@ class RouteTest extends TestCase
         $this->assertTrue($route->hasScheme('httpS'));
     }
 
-    /**
-     * @group legacy
-     */
-    public function testLegacySchemeRequirement()
-    {
-        $route = new Route('/');
-        $route->setRequirement('_scheme', 'http|https');
-        $this->assertEquals('http|https', $route->getRequirement('_scheme'));
-        $this->assertEquals(array('http', 'https'), $route->getSchemes());
-        $this->assertTrue($route->hasScheme('https'));
-        $this->assertTrue($route->hasScheme('http'));
-        $this->assertFalse($route->hasScheme('ftp'));
-        $route->setSchemes(array('hTTp'));
-        $this->assertEquals('http', $route->getRequirement('_scheme'));
-        $route->setSchemes(array());
-        $this->assertNull($route->getRequirement('_scheme'));
-    }
-
     public function testMethod()
     {
         $route = new Route('/');
@@ -193,21 +175,6 @@ class RouteTest extends TestCase
         $this->assertEquals(array('GET', 'POST'), $route->getMethods(), '->setMethods() accepts an array of methods and uppercases them');
     }
 
-    /**
-     * @group legacy
-     */
-    public function testLegacyMethodRequirement()
-    {
-        $route = new Route('/');
-        $route->setRequirement('_method', 'GET|POST');
-        $this->assertEquals('GET|POST', $route->getRequirement('_method'));
-        $this->assertEquals(array('GET', 'POST'), $route->getMethods());
-        $route->setMethods(array('gEt'));
-        $this->assertEquals('GET', $route->getRequirement('_method'));
-        $route->setMethods(array());
-        $this->assertNull($route->getRequirement('_method'));
-    }
-
     public function testCondition()
     {
         $route = new Route('/');
@@ -225,18 +192,6 @@ class RouteTest extends TestCase
         $this->assertNotSame($compiled, $route->compile(), '->compile() recompiles if the route was modified');
     }
 
-    /**
-     * @group legacy
-     */
-    public function testLegacyPattern()
-    {
-        $route = new Route('/{foo}');
-        $this->assertEquals('/{foo}', $route->getPattern());
-
-        $route->setPattern('/bar');
-        $this->assertEquals('/bar', $route->getPattern());
-    }
-
     public function testSerialize()
     {
         $route = new Route('/prefix/{foo}', array('foo' => 'default'), array('foo' => '\d+'));