99use CodeIgniter \Shield \Models \UserModel ;
1010use CodeIgniter \Test \DatabaseTestTrait ;
1111
12+ /**
13+ * @internal
14+ */
1215final class PermissionFilterTest extends AbstractFilterTest
1316{
1417 use DatabaseTestTrait;
1518
16- protected string $ alias = 'permission ' ;
17- protected string $ classname = PermissionFilter::class;
19+ protected string $ alias = 'permission ' ;
20+ protected string $ classname = PermissionFilter::class;
1821 protected string $ routeFilter = 'permission:admin.access ' ;
1922
2023 public function testFilterNotAuthorized (): void
@@ -28,7 +31,7 @@ public function testFilterNotAuthorized(): void
2831 $ result ->assertSee ('Open ' );
2932 }
3033
31- public function testFilterSuccess ()
34+ public function testFilterSuccess (): void
3235 {
3336 /** @var User */
3437 $ user = fake (UserModel::class);
@@ -45,7 +48,7 @@ public function testFilterSuccess()
4548 $ this ->assertSame ($ user ->id , auth ('session ' )->user ()->id );
4649 }
4750
48- public function testFilterIncorrectGroupNoPrevious ()
51+ public function testFilterIncorrectGroupNoPrevious (): void
4952 {
5053 /** @var User */
5154 $ user = fake (UserModel::class);
@@ -61,7 +64,7 @@ public function testFilterIncorrectGroupNoPrevious()
6164 $ result ->assertSessionHas ('error ' );
6265 }
6366
64- public function testFilterIncorrectGroupWithPrevious ()
67+ public function testFilterIncorrectGroupWithPrevious (): void
6568 {
6669 /** @var User */
6770 $ user = fake (UserModel::class);
@@ -77,5 +80,4 @@ public function testFilterIncorrectGroupWithPrevious()
7780
7881 $ result ->assertSessionHas ('error ' );
7982 }
80-
8183}
0 commit comments