* * 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:----u5t6a4LI+wVbnM0CTmG/nq2nWVYVZmNvgBOQervYwRhDxMkGidDbTEWYOC57Am0jTDUk9ubMv42wXwxMhkw3/DLCGBBn99J3OsfwOddBLjyqr94jtTIEG0udEqaZF2MRnfOxrfOp7bbjzT5mtM30+6/hsI2NW16ri1+9o0MVoz75Gko1LF0w/485P71wO9o2tnt6SoYp7ZxLRTY5C9c1zQ2C38SgOnLq4bXHWr66KSnzJMh75nTI0mXGCUR/aSCqp1w8vJiUQV3Wqk326km/JBnfKik9rFaDQ9Dw2ekGrsNdSO3V97O/0fhLOfG6BWOyEObP8NbUANCnERRxiIKyLiLCTNvRR8hqbilYXvgwu7WWpd3IOniYqSDYo0wgGe+YtgyAv+fFip3l/KGFOt1AqrJnUu/TJd2qDFG+Zs6PA6InFsvCITsO/RBMolw+QQwEsX1BHPPWFrADMnm4yHYgHecKyGpD+HX4H84FyPEgh7sgntVnhoxOaGJm7RtG9DMhoqHnBxfYUzIc0j1ep1W6H2FJXXL9ZVm49wY7MzwDW2OybuyNOlF+Cmg4Y8WSEibCXHn7+omSltvYZ9A/mPmdaZNkag2pjc7CGh7/+iU19sb2wpGNsgTyESoL9ZVHBDcMbm4+ziC98bmqq5p9xLnCbYCpdFlWLvhTeatdFlzSzko=----ATTACHMENT:----NzUwMzM0MTYzNTU0MDIyOCA3MzcxMTc1NDcwNTg0NjQ5IDk2NjE1OTI0NTkxMjU5Ng==