|
13 | 13 |
|
14 | 14 | use PHPUnit\Framework\TestCase;
|
15 | 15 | use Symfony\Component\Routing\Route;
|
| 16 | +use Symfony\Component\Routing\Tests\Fixtures\CustomCompiledRoute; |
| 17 | +use Symfony\Component\Routing\Tests\Fixtures\CustomRouteCompiler; |
16 | 18 |
|
17 | 19 | class RouteTest extends TestCase
|
18 | 20 | {
|
@@ -242,13 +244,13 @@ public function testSerializeWhenCompiled()
|
242 | 244 | */
|
243 | 245 | public function testSerializeWhenCompiledWithClass()
|
244 | 246 | {
|
245 |
| - $route = new Route('/', [], [], ['compiler_class' => '\Symfony\Component\Routing\Tests\Fixtures\CustomRouteCompiler']); |
246 |
| - $this->assertInstanceOf('\Symfony\Component\Routing\Tests\Fixtures\CustomCompiledRoute', $route->compile(), '->compile() returned a proper route'); |
| 247 | + $route = new Route('/', [], [], ['compiler_class' => CustomRouteCompiler::class]); |
| 248 | + $this->assertInstanceOf(CustomCompiledRoute::class, $route->compile(), '->compile() returned a proper route'); |
247 | 249 |
|
248 | 250 | $serialized = serialize($route);
|
249 | 251 | try {
|
250 | 252 | $unserialized = unserialize($serialized);
|
251 |
| - $this->assertInstanceOf('\Symfony\Component\Routing\Tests\Fixtures\CustomCompiledRoute', $unserialized->compile(), 'the unserialized route compiled successfully'); |
| 253 | + $this->assertInstanceOf(CustomCompiledRoute::class, $unserialized->compile(), 'the unserialized route compiled successfully'); |
252 | 254 | } catch (\Exception $e) {
|
253 | 255 | $this->fail('unserializing a route which uses a custom compiled route class');
|
254 | 256 | }
|
|
0 commit comments