Skip to content

Commit 7c4b2c2

Browse files
committed
Force UserModel
1 parent 0346c2b commit 7c4b2c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/_support/FeatureTestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
use CodeIgniter\Config\Factories;
44
use Config\Services;
55
use Tatter\Files\Models\FileModel;
6+
use Tests\Support\Models\UserModel;
67

78
class FeatureTestCase extends FilesTestCase
89
{
@@ -37,6 +38,9 @@ protected function setUp(): void
3738
parent::setUp();
3839

3940
$this->resetAuthServices();
41+
42+
// Make sure we use the correct UserModel for permissions
43+
Factories::injectMock('models', UserModel::class, new UserModel());
4044
}
4145

4246
/**

0 commit comments

Comments
 (0)