4 * This file is part of the Symfony package.
6 * (c) Fabien Potencier <fabien@symfony.com>
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
12 namespace Symfony\Component\Routing\Tests\Matcher;
14 use Symfony\Component\Routing\Matcher\Dumper\PhpMatcherDumper;
15 use Symfony\Component\Routing\Matcher\RedirectableUrlMatcherInterface;
16 use Symfony\Component\Routing\Matcher\UrlMatcher;
17 use Symfony\Component\Routing\RequestContext;
18 use Symfony\Component\Routing\RouteCollection;
20 class DumpedRedirectableUrlMatcherTest extends RedirectableUrlMatcherTest
22 protected function getUrlMatcher(RouteCollection $routes, RequestContext $context = null)
26 $class = 'DumpedRedirectableUrlMatcher'.++$i;
27 $dumper = new PhpMatcherDumper($routes);
28 eval('?>'.$dumper->dump(array('class' => $class, 'base_class' => 'Symfony\Component\Routing\Tests\Matcher\TestDumpedRedirectableUrlMatcher')));
30 return $this->getMockBuilder($class)
31 ->setConstructorArgs(array($context ?: new RequestContext()))
32 ->setMethods(array('redirect'))
37 class TestDumpedRedirectableUrlMatcher extends UrlMatcher implements RedirectableUrlMatcherInterface
39 public function redirect($path, $route, $scheme = null)