|
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 | {
|
@@ -266,13 +268,13 @@ public function testSerializeWhenCompiled()
|
266 | 268 | */
|
267 | 269 | public function testSerializeWhenCompiledWithClass()
|
268 | 270 | {
|
269 |
| - $route = new Route('/', [], [], ['compiler_class' => '\Symfony\Component\Routing\Tests\Fixtures\CustomRouteCompiler']); |
270 |
| - $this->assertInstanceOf('\Symfony\Component\Routing\Tests\Fixtures\CustomCompiledRoute', $route->compile(), '->compile() returned a proper route'); |
| 271 | + $route = new Route('/', [], [], ['compiler_class' => CustomRouteCompiler::class]); |
| 272 | + $this->assertInstanceOf(CustomCompiledRoute::class, $route->compile(), '->compile() returned a proper route'); |
271 | 273 |
|
272 | 274 | $serialized = serialize($route);
|
273 | 275 | try {
|
274 | 276 | $unserialized = unserialize($serialized);
|
275 |
| - $this->assertInstanceOf('\Symfony\Component\Routing\Tests\Fixtures\CustomCompiledRoute', $unserialized->compile(), 'the unserialized route compiled successfully'); |
| 277 | + $this->assertInstanceOf(CustomCompiledRoute::class, $unserialized->compile(), 'the unserialized route compiled successfully'); |
276 | 278 | } catch (\Exception $e) {
|
277 | 279 | $this->fail('unserializing a route which uses a custom compiled route class');
|
278 | 280 | }
|
|
0 commit comments