Skip to content

Commit 2424f13

Browse files
committed
test: remove unneeded assertions
The return type is typed.
1 parent 3e48895 commit 2424f13

File tree

2 files changed

+0
-9
lines changed

2 files changed

+0
-9
lines changed

phpstan-baseline.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,11 +361,6 @@
361361
'count' => 1,
362362
'path' => __DIR__ . '/src/Models/UserModel.php',
363363
];
364-
$ignoreErrors[] = [
365-
'message' => '#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with \'CodeIgniter\\\\\\\\Shield\\\\\\\\Result\' and CodeIgniter\\\\Shield\\\\Result will always evaluate to true\\.$#',
366-
'count' => 2,
367-
'path' => __DIR__ . '/tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php',
368-
];
369364
$ignoreErrors[] = [
370365
'message' => '#^Call to method PHPUnit\\\\Framework\\\\Assert\\:\\:assertInstanceOf\\(\\) with \'CodeIgniter\\\\\\\\Shield\\\\\\\\Result\' and CodeIgniter\\\\Shield\\\\Result will always evaluate to true\\.$#',
371366
'count' => 3,

tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
use CodeIgniter\Shield\Entities\User;
2323
use CodeIgniter\Shield\Models\UserIdentityModel;
2424
use CodeIgniter\Shield\Models\UserModel;
25-
use CodeIgniter\Shield\Result;
2625
use CodeIgniter\Test\Mock\MockEvents;
2726
use Config\Services;
2827
use Tests\Support\DatabaseTestCase;
@@ -183,7 +182,6 @@ public function testAttemptCannotFindUser(): void
183182
'token' => 'abc123',
184183
]);
185184

186-
$this->assertInstanceOf(Result::class, $result);
187185
$this->assertFalse($result->isOK());
188186
$this->assertSame(lang('Auth.badToken'), $result->reason());
189187

@@ -206,7 +204,6 @@ public function testAttemptSuccess(): void
206204
'token' => $token->raw_token,
207205
]);
208206

209-
$this->assertInstanceOf(Result::class, $result);
210207
$this->assertTrue($result->isOK());
211208

212209
$foundUser = $result->extraInfo();
@@ -239,7 +236,6 @@ public function testAttemptSuccessLog(): void
239236
'token' => $token->raw_token,
240237
]);
241238

242-
$this->assertInstanceOf(Result::class, $result);
243239
$this->assertTrue($result->isOK());
244240

245241
$foundUser = $result->extraInfo();

0 commit comments

Comments
 (0)