File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -60,14 +60,13 @@ public function testGenerateUserModel(): void
60
60
61
61
public function testGenerateUserModelCustomNamespace (): void
62
62
{
63
- command ('shield:model MyUserModel --namespace Tests ' );
64
- $ filepath = Tests . 'MyUserModel.php ' ;
65
-
63
+ command ('shield:model MyUserModel --namespace CodeIgniter \\\\Shield ' );
64
+ $ filepath = VENDORPATH . 'codeigniter4/shield/src/Models/MyUserModel.php ' ;
66
65
67
66
$ this ->assertStringContainsString ('File created: ' , CITestStreamFilter::$ buffer );
68
67
$ this ->assertFileExists ($ filepath );
69
68
70
- $ this ->assertStringContainsString ('namespace Tests ; ' , $ this ->getFileContents ($ filepath ));
69
+ $ this ->assertStringContainsString ('namespace CodeIgniter\Shield\Models ; ' , $ this ->getFileContents ($ filepath ));
71
70
$ this ->assertStringContainsString ('class MyUserModel extends UserModel ' , $ this ->getFileContents ($ filepath ));
72
71
$ this ->assertStringContainsString ('use CodeIgniter\Shield\Models\UserModel; ' , $ this ->getFileContents ($ filepath ));
73
72
$ this ->assertStringContainsString ('protected function initialize(): void ' , $ this ->getFileContents ($ filepath ));
You can’t perform that action at this time.
0 commit comments