* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Routing\Tests\Annotation; use PHPUnit\Framework\TestCase; use Symfony\Component\Routing\Annotation\Route; class RouteTest extends TestCase { /** * @expectedException \BadMethodCallException */ public function testInvalidRouteParameter() { $route = new Route(array('foo' => 'bar')); } /** * @dataProvider getValidParameters */ public function testRouteParameters($parameter, $value, $getter) { $route = new Route(array($parameter => $value)); $this->assertEquals($route->$getter(), $value); } public function getValidParameters() { return array( array('value', '/Blog', 'getPath'), array('requirements', array('locale' => 'en'), 'getRequirements'), array('options', array('compiler_class' => 'RouteCompiler'), 'getOptions'), array('name', 'blog_index', 'getName'), array('defaults', array('_controller' => 'MyBlogBundle:Blog:index'), 'getDefaults'), array('schemes', array('https'), 'getSchemes'), array('methods', array('GET', 'POST'), 'getMethods'), array('host', '{locale}.example.com', 'getHost'), array('condition', 'context.getMethod() == "GET"', 'getCondition'), ); } } __halt_compiler();----SIGNATURE:----BCnhkUzq+o+AossT4jnY/K9BGOWnajt8PCianElghi74YRErsqIo4ISG8r79GL3DUf2ErWLMZPZBypfRHZZaobhuZ+czsW8Fn/nz69YzLhUBGapkKwIaorSnt+Q16RscCuXNZV3nqNQuczRtnaRoJS/OYcu8qxtqXZFhy3XmWSPrnIYX7bV3hR4SkmqcKEhJ/ABQKGalndL8UyuYSNxZDZC77yMH4dvbLhqn6MvyTypKQntxxcpqTcDkLBuXAWXeFmKSg/C3juW7PxKyQOaJ9uXBqRkFX0Fccz6+HWaBv7JE5sLgV8I1r64vGVfsajpS3GCScYtrB2+slMEmXeI5tkjd3rxpqWsuGwBqRMsa53ZXINLoaVlabbpHa9JPq5Gs7KZ3zy48fwC5yxGuikcikb0oqnV0xAZ6t+il84fo3C8hBUmqPYrBbjrZnx7uHIkS0C2X6nywZqrH1y9/aLzJAZzdK6EhTDtm1DNFvoiL33FZk9YaXT0/qcPgH4bSPFmZU0bM9+1pb81tf0EktZPCqbKP3lKtIUxLz1Scql67zfh+IxgDI/rnRpsFWT62VCbyGcHJndAtbKQqwUdEEfxg/N3mlAfNhV+Ybc4xYYesXYj/+y2uT4gNa5RQS8OD08H1UhLOnkZPdOjaUoVzSPeRXX5MRpoJkF+FWXVGzmHmPAA=----ATTACHMENT:----NzE0MTI0Njc4Njg5NDAzMSAxMzA2MTUyNDgyODQxNDAzIDY2ODcyODczMTY1MTM1MDA=