Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / vendor / symfony / routing / Tests / Matcher / DumpedUrlMatcherTest.php
1 <?php
2
3 /*
4  * This file is part of the Symfony package.
5  *
6  * (c) Fabien Potencier <fabien@symfony.com>
7  *
8  * For the full copyright and license information, please view the LICENSE
9  * file that was distributed with this source code.
10  */
11
12 namespace Symfony\Component\Routing\Tests\Matcher;
13
14 use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper;
15 use Symfony\Component\Routing\RequestContext;
16 use Symfony\Component\Routing\RouteCollection;
17
18 class DumpedUrlMatcherTest extends UrlMatcherTest
19 {
20     /**
21      * @expectedException \LogicException
22      * @expectedExceptionMessage The "schemes" requirement is only supported for URL matchers that implement RedirectableUrlMatcherInterface.
23      */
24     public function testSchemeRequirement()
25     {
26         parent::testSchemeRequirement();
27     }
28
29     /**
30      * @expectedException \LogicException
31      * @expectedExceptionMessage The "schemes" requirement is only supported for URL matchers that implement RedirectableUrlMatcherInterface.
32      */
33     public function testSchemeAndMethodMismatch()
34     {
35         parent::testSchemeRequirement();
36     }
37
38     protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null)
39     {
40         static $i = 0;
41
42         $class = 'DumpedUrlMatcher'.++$i;
43         $dumper = new PhpMatcherDumper($routes);
44         eval('?>'.$dumper->dump(array('class' => $class)));
45
46         return new $class($context ?: new RequestContext());
47     }
48 }