@@ -50,7 +50,7 @@ public function testEnvironment()
5050 */
5151 public function testGetSession ()
5252 {
53- $ request = $ this ->getMockBuilder (' Symfony\Component\HttpFoundation\ Request' )->getMock ();
53+ $ request = $ this ->getMockBuilder (Request::class )->getMock ();
5454 $ request ->method ('hasSession ' )->willReturn (true );
5555 $ request ->method ('getSession ' )->willReturn ($ session = new Session ());
5656
@@ -75,18 +75,18 @@ public function testGetRequest()
7575
7676 public function testGetToken ()
7777 {
78- $ tokenStorage = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )->getMock ();
78+ $ tokenStorage = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface::class )->getMock ();
7979 $ this ->appVariable ->setTokenStorage ($ tokenStorage );
8080
81- $ token = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\TokenInterface ' )->getMock ();
81+ $ token = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \TokenInterface::class )->getMock ();
8282 $ tokenStorage ->method ('getToken ' )->willReturn ($ token );
8383
8484 $ this ->assertEquals ($ token , $ this ->appVariable ->getToken ());
8585 }
8686
8787 public function testGetUser ()
8888 {
89- $ this ->setTokenStorage ($ user = $ this ->getMockBuilder (' Symfony\Component\Security\Core\User\UserInterface ' )->getMock ());
89+ $ this ->setTokenStorage ($ user = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \User \UserInterface::class )->getMock ());
9090
9191 $ this ->assertEquals ($ user , $ this ->appVariable ->getUser ());
9292 }
@@ -100,53 +100,53 @@ public function testGetUserWithUsernameAsTokenUser()
100100
101101 public function testGetTokenWithNoToken ()
102102 {
103- $ tokenStorage = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )->getMock ();
103+ $ tokenStorage = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface::class )->getMock ();
104104 $ this ->appVariable ->setTokenStorage ($ tokenStorage );
105105
106106 $ this ->assertNull ($ this ->appVariable ->getToken ());
107107 }
108108
109109 public function testGetUserWithNoToken ()
110110 {
111- $ tokenStorage = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )->getMock ();
111+ $ tokenStorage = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface::class )->getMock ();
112112 $ this ->appVariable ->setTokenStorage ($ tokenStorage );
113113
114114 $ this ->assertNull ($ this ->appVariable ->getUser ());
115115 }
116116
117117 public function testEnvironmentNotSet ()
118118 {
119- $ this ->expectException (' RuntimeException ' );
119+ $ this ->expectException (\ RuntimeException::class );
120120 $ this ->appVariable ->getEnvironment ();
121121 }
122122
123123 public function testDebugNotSet ()
124124 {
125- $ this ->expectException (' RuntimeException ' );
125+ $ this ->expectException (\ RuntimeException::class );
126126 $ this ->appVariable ->getDebug ();
127127 }
128128
129129 public function testGetTokenWithTokenStorageNotSet ()
130130 {
131- $ this ->expectException (' RuntimeException ' );
131+ $ this ->expectException (\ RuntimeException::class );
132132 $ this ->appVariable ->getToken ();
133133 }
134134
135135 public function testGetUserWithTokenStorageNotSet ()
136136 {
137- $ this ->expectException (' RuntimeException ' );
137+ $ this ->expectException (\ RuntimeException::class );
138138 $ this ->appVariable ->getUser ();
139139 }
140140
141141 public function testGetRequestWithRequestStackNotSet ()
142142 {
143- $ this ->expectException (' RuntimeException ' );
143+ $ this ->expectException (\ RuntimeException::class );
144144 $ this ->appVariable ->getRequest ();
145145 }
146146
147147 public function testGetSessionWithRequestStackNotSet ()
148148 {
149- $ this ->expectException (' RuntimeException ' );
149+ $ this ->expectException (\ RuntimeException::class );
150150 $ this ->appVariable ->getSession ();
151151 }
152152
@@ -224,18 +224,18 @@ public function testGetFlashes()
224224
225225 protected function setRequestStack ($ request )
226226 {
227- $ requestStackMock = $ this ->getMockBuilder (' Symfony\Component\HttpFoundation\RequestStack ' )->getMock ();
227+ $ requestStackMock = $ this ->getMockBuilder (\ Symfony \Component \HttpFoundation \RequestStack::class )->getMock ();
228228 $ requestStackMock ->method ('getCurrentRequest ' )->willReturn ($ request );
229229
230230 $ this ->appVariable ->setRequestStack ($ requestStackMock );
231231 }
232232
233233 protected function setTokenStorage ($ user )
234234 {
235- $ tokenStorage = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface ' )->getMock ();
235+ $ tokenStorage = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \Storage \TokenStorageInterface::class )->getMock ();
236236 $ this ->appVariable ->setTokenStorage ($ tokenStorage );
237237
238- $ token = $ this ->getMockBuilder (' Symfony\Component\Security\Core\Authentication\Token\TokenInterface ' )->getMock ();
238+ $ token = $ this ->getMockBuilder (\ Symfony \Component \Security \Core \Authentication \Token \TokenInterface::class )->getMock ();
239239 $ tokenStorage ->method ('getToken ' )->willReturn ($ token );
240240
241241 $ token ->method ('getUser ' )->willReturn ($ user );
@@ -251,11 +251,11 @@ private function setFlashMessages($sessionHasStarted = true)
251251 $ flashBag = new FlashBag ();
252252 $ flashBag ->initialize ($ flashMessages );
253253
254- $ session = $ this ->getMockBuilder (' Symfony\Component\HttpFoundation\ Session\Session ' )->disableOriginalConstructor ()->getMock ();
254+ $ session = $ this ->getMockBuilder (Session::class )->disableOriginalConstructor ()->getMock ();
255255 $ session ->method ('isStarted ' )->willReturn ($ sessionHasStarted );
256256 $ session ->method ('getFlashBag ' )->willReturn ($ flashBag );
257257
258- $ request = $ this ->getMockBuilder (' Symfony\Component\HttpFoundation\ Request' )->getMock ();
258+ $ request = $ this ->getMockBuilder (Request::class )->getMock ();
259259 $ request ->method ('hasSession ' )->willReturn (true );
260260 $ request ->method ('getSession ' )->willReturn ($ session );
261261 $ this ->setRequestStack ($ request );
0 commit comments