33namespace spec \winzou \Bundle \StateMachineBundle \Callback ;
44
55use PhpSpec \ObjectBehavior ;
6- use Prophecy \Argument ;
76use SM \Event \TransitionEvent ;
87use Symfony \Component \DependencyInjection \ContainerInterface ;
98use Symfony \Component \DependencyInjection \Exception \ServiceNotFoundException ;
9+ use winzou \Bundle \StateMachineBundle \Callback \ContainerAwareCallback ;
1010
1111class ContainerAwareCallbackSpec extends ObjectBehavior
1212{
@@ -17,7 +17,7 @@ function let(ContainerInterface $container)
1717
1818 function it_is_initializable ()
1919 {
20- $ this ->shouldHaveType (' winzou\Bundle\StateMachineBundle\Callback\ ContainerAwareCallback' );
20+ $ this ->shouldHaveType (ContainerAwareCallback::class );
2121 }
2222
2323 function it_converts_servicename_to_class ($ container , TransitionEvent $ event , ContainerAwareCallbackSpec $ service )
@@ -46,9 +46,9 @@ function it_converts_classname_to_class($container, TransitionEvent $event, Cont
4646
4747 function it_allows_static_calls ($ container , TransitionEvent $ event )
4848 {
49- $ this ->beConstructedWith (array (), array (' spec \\ winzou \\ Bundle \\ StateMachineBundle \\ Callback \\ ContainerAwareCallbackSpec ' , 'dummyStatic ' ), $ container );
49+ $ this ->beConstructedWith (array (), array (ContainerAwareCallbackSpec::class , 'dummyStatic ' ), $ container );
5050
51- $ container ->has (' spec \\ winzou \\ Bundle \\ StateMachineBundle \\ Callback \\ ContainerAwareCallbackSpec ' )->willReturn (false );
51+ $ container ->has (ContainerAwareCallbackSpec::class )->willReturn (false );
5252
5353 $ this ->call ($ event )->shouldReturn (2 );
5454 }
@@ -58,9 +58,9 @@ function it_throws_an_exception_when_relevant($container, TransitionEvent $event
5858 $ this ->beConstructedWith (array (), array ('@my_service ' , 'dummy ' ), $ container );
5959
6060 $ container ->has ('my_service ' )->willReturn (false );
61- $ container ->get ('my_service ' )->willThrow (' Symfony\Component\DependencyInjection\Exception\ ServiceNotFoundException' );
61+ $ container ->get ('my_service ' )->willThrow (ServiceNotFoundException::class );
6262
63- $ this ->shouldThrow (' Symfony\Component\DependencyInjection\Exception\ ServiceNotFoundException' )->during ('call ' , array ($ event ));
63+ $ this ->shouldThrow (ServiceNotFoundException::class )->during ('call ' , array ($ event ));
6464 }
6565
6666 function dummy ()
0 commit comments