@@ -59,11 +59,14 @@ class EventDispatchingAdapterTest extends \PHPUnit_Framework_TestCase
59
59
*/
60
60
private $ autoRoute2 ;
61
61
62
+ /**
63
+ * @var object
64
+ */
62
65
private $ content ;
63
66
64
67
public function setUp ()
65
68
{
66
- $ this ->realAdapter = $ this ->prophesize (' Symfony\Cmf\Component\RoutingAuto\ AdapterInterface' );
69
+ $ this ->realAdapter = $ this ->prophesize (AdapterInterface::class );
67
70
$ this ->dispatcher = new EventDispatcher ();
68
71
$ this ->adapter = new EventDispatchingAdapter (
69
72
$ this ->realAdapter ->reveal (),
@@ -72,9 +75,9 @@ public function setUp()
72
75
73
76
$ this ->subscriber = new EventDispatchingAdapterSubscriber ();
74
77
$ this ->dispatcher ->addSubscriber ($ this ->subscriber );
75
- $ this ->uriContext = $ this ->prophesize (' Symfony\Cmf\Component\RoutingAuto\ UriContext' );
76
- $ this ->autoRoute = $ this ->prophesize (' Symfony\Cmf\Component\RoutingAuto\Model\ AutoRouteInterface' );
77
- $ this ->autoRoute2 = $ this ->prophesize (' Symfony\Cmf\Component\RoutingAuto\Model\ AutoRouteInterface' );
78
+ $ this ->uriContext = $ this ->prophesize (UriContext::class );
79
+ $ this ->autoRoute = $ this ->prophesize (AutoRouteInterface::class );
80
+ $ this ->autoRoute2 = $ this ->prophesize (AutoRouteInterface::class );
78
81
$ this ->content = new \stdClass ();
79
82
}
80
83
@@ -83,7 +86,7 @@ public function testCreateAutoRoute()
83
86
$ this ->realAdapter ->createAutoRoute ($ this ->uriContext ->reveal (), 'fr ' )->willReturn ($ this ->autoRoute ->reveal ());
84
87
$ this ->adapter ->createAutoRoute ($ this ->uriContext ->reveal (), 'fr ' );
85
88
$ this ->assertNotNull ($ this ->subscriber ->createEvent );
86
- $ this ->assertInstanceOf (' Symfony\Cmf\Component\RoutingAuto\Event\ AutoRouteCreateEvent' , $ this ->subscriber ->createEvent );
89
+ $ this ->assertInstanceOf (AutoRouteCreateEvent::class , $ this ->subscriber ->createEvent );
87
90
$ this ->assertSame ($ this ->autoRoute ->reveal (), $ this ->subscriber ->createEvent ->getAutoRoute ());
88
91
$ this ->assertSame ($ this ->uriContext ->reveal (), $ this ->subscriber ->createEvent ->getUriContext ());
89
92
}
@@ -95,7 +98,7 @@ public function testMigrateAutoRouteChildren()
95
98
$ this ->autoRoute2 ->reveal ()
96
99
);
97
100
$ this ->assertNotNull ($ this ->subscriber ->migrateEvent );
98
- $ this ->assertInstanceOf (' Symfony\Cmf\Component\RoutingAuto\Event\ AutoRouteMigrateEvent' , $ this ->subscriber ->migrateEvent );
101
+ $ this ->assertInstanceOf (AutoRouteMigrateEvent::class , $ this ->subscriber ->migrateEvent );
99
102
$ this ->assertSame ($ this ->autoRoute ->reveal (), $ this ->subscriber ->migrateEvent ->getSrcAutoRoute ());
100
103
$ this ->assertSame ($ this ->autoRoute2 ->reveal (), $ this ->subscriber ->migrateEvent ->getDestAutoRoute ());
101
104
}
0 commit comments