public function RouteTest::testMethod in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/routing/Tests/RouteTest.php \Symfony\Component\Routing\Tests\RouteTest::testMethod()
File
- vendor/
symfony/ routing/ Tests/ RouteTest.php, line 185
Class
Namespace
Symfony\Component\Routing\TestsCode
public function testMethod() {
$route = new Route('/');
$this
->assertEquals(array(), $route
->getMethods(), 'methods is initialized with array()');
$route
->setMethods('gEt');
$this
->assertEquals(array(
'GET',
), $route
->getMethods(), '->setMethods() accepts a single method string and uppercases it');
$route
->setMethods(array(
'gEt',
'PosT',
));
$this
->assertEquals(array(
'GET',
'POST',
), $route
->getMethods(), '->setMethods() accepts an array of methods and uppercases them');
}