@@ -37,7 +37,7 @@ protected function setUp(): void
3737 Services::injectMock ('events ' , new MockEvents ());
3838 }
3939
40- public function testLogin ()
40+ public function testLogin (): void
4141 {
4242 $ user = fake (UserModel::class);
4343
@@ -48,7 +48,7 @@ public function testLogin()
4848 $ this ->assertSame ($ user ->id , $ this ->auth ->getUser ()->id );
4949 }
5050
51- public function testLogout ()
51+ public function testLogout (): void
5252 {
5353 // this one's a little odd since it's stateless, but roll with it...
5454 $ user = fake (UserModel::class);
@@ -60,7 +60,7 @@ public function testLogout()
6060 $ this ->assertNull ($ this ->auth ->getUser ());
6161 }
6262
63- public function testLoginByIdNoToken ()
63+ public function testLoginByIdNoToken (): void
6464 {
6565 $ user = fake (UserModel::class);
6666
@@ -72,7 +72,7 @@ public function testLoginByIdNoToken()
7272 $ this ->assertNull ($ this ->auth ->getUser ()->currentAccessToken ());
7373 }
7474
75- public function testLoginByIdWithToken ()
75+ public function testLoginByIdWithToken (): void
7676 {
7777 /** @var User $user */
7878 $ user = fake (UserModel::class);
@@ -87,7 +87,7 @@ public function testLoginByIdWithToken()
8787 $ this ->assertSame ($ token ->id , $ this ->auth ->getUser ()->currentAccessToken ()->id );
8888 }
8989
90- public function testLoginByIdWithMultipleTokens ()
90+ public function testLoginByIdWithMultipleTokens (): void
9191 {
9292 /** @var User $user */
9393 $ user = fake (UserModel::class);
@@ -103,15 +103,15 @@ public function testLoginByIdWithMultipleTokens()
103103 $ this ->assertSame ($ token1 ->id , $ this ->auth ->getUser ()->currentAccessToken ()->id );
104104 }
105105
106- public function testCheckNoToken ()
106+ public function testCheckNoToken (): void
107107 {
108108 $ result = $ this ->auth ->check ([]);
109109
110110 $ this ->assertFalse ($ result ->isOK ());
111111 $ this ->assertSame (lang ('Auth.noToken ' ), $ result ->reason ());
112112 }
113113
114- public function testCheckBadToken ()
114+ public function testCheckBadToken (): void
115115 {
116116 $ result = $ this ->auth ->check (['token ' => 'abc123 ' ]);
117117
@@ -135,7 +135,7 @@ public function testCheckOldToken()
135135 $ this ->assertSame (lang ('Auth.oldToken ' ), $ result ->reason ());
136136 }
137137
138- public function testCheckSuccess ()
138+ public function testCheckSuccess (): void
139139 {
140140 /** @var User $user */
141141 $ user = fake (UserModel::class);
@@ -157,7 +157,7 @@ public function testCheckSuccess()
157157 $ this ->assertNotEmpty ($ updatedToken ->last_used_at );
158158 }
159159
160- public function testAttemptCannotFindUser ()
160+ public function testAttemptCannotFindUser (): void
161161 {
162162 $ result = $ this ->auth ->attempt ([
163163 'token ' => 'abc123 ' ,
@@ -175,7 +175,7 @@ public function testAttemptCannotFindUser()
175175 ]);
176176 }
177177
178- public function testAttemptSuccess ()
178+ public function testAttemptSuccess (): void
179179 {
180180 /** @var User $user */
181181 $ user = fake (UserModel::class);
@@ -203,7 +203,7 @@ public function testAttemptSuccess()
203203 ]);
204204 }
205205
206- protected function setRequestHeader (string $ token )
206+ protected function setRequestHeader (string $ token ): void
207207 {
208208 $ request = service ('request ' );
209209 $ request ->setHeader ('Authorization ' , 'Bearer ' . $ token );
0 commit comments