Dashboard sipadu mbip
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

DumpedUrlMatcherTest.php 864B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Routing\Tests\Matcher;
  11. use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper;
  12. use Symfony\Component\Routing\RequestContext;
  13. use Symfony\Component\Routing\RouteCollection;
  14. /**
  15. * @group legacy
  16. */
  17. class DumpedUrlMatcherTest extends UrlMatcherTest
  18. {
  19. protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null)
  20. {
  21. static $i = 0;
  22. $class = 'DumpedUrlMatcher'.++$i;
  23. $dumper = new PhpMatcherDumper($routes);
  24. eval('?>'.$dumper->dump(['class' => $class]));
  25. return new $class($context ?: new RequestContext());
  26. }
  27. }