|
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 | {
|
@@ -243,13 +245,13 @@ public function testSerializeWhenCompiled()
|
243 | 245 | */
|
244 | 246 | public function testSerializeWhenCompiledWithClass()
|
245 | 247 | {
|
246 |
| - $route = new Route('/', [], [], ['compiler_class' => '\Symfony\Component\Routing\Tests\Fixtures\CustomRouteCompiler']); |
247 |
| - $this->assertInstanceOf('\Symfony\Component\Routing\Tests\Fixtures\CustomCompiledRoute', $route->compile(), '->compile() returned a proper route'); |
| 248 | + $route = new Route('/', [], [], ['compiler_class' => CustomRouteCompiler::class]); |
| 249 | + $this->assertInstanceOf(CustomCompiledRoute::class, $route->compile(), '->compile() returned a proper route'); |
248 | 250 |
|
249 | 251 | $serialized = serialize($route);
|
250 | 252 | try {
|
251 | 253 | $unserialized = unserialize($serialized);
|
252 |
| - $this->assertInstanceOf('\Symfony\Component\Routing\Tests\Fixtures\CustomCompiledRoute', $unserialized->compile(), 'the unserialized route compiled successfully'); |
| 254 | + $this->assertInstanceOf(CustomCompiledRoute::class, $unserialized->compile(), 'the unserialized route compiled successfully'); |
253 | 255 | } catch (\Exception $e) {
|
254 | 256 | $this->fail('unserializing a route which uses a custom compiled route class');
|
255 | 257 | }
|
|
0 commit comments