@@ -47,7 +47,7 @@ protected function getFileContents(string $filepath): string
47
47
public function testGenerateUserModel (): void
48
48
{
49
49
command ('shield:model MyUserModel ' );
50
- $ filepath = APPPATH . 'Models\ MyUserModel.php ' ;
50
+ $ filepath = APPPATH . 'Models/ MyUserModel.php ' ;
51
51
52
52
$ this ->assertStringContainsString ('File created: ' , CITestStreamFilter::$ buffer );
53
53
$ this ->assertFileExists ($ filepath );
@@ -60,13 +60,14 @@ public function testGenerateUserModel(): void
60
60
61
61
public function testGenerateUserModelCustomNamespace (): void
62
62
{
63
- command ('shield:model MyUserModel --namespace CodeIgniter \\\\Shield ' );
64
- $ filepath = VENDORPATH . 'codeigniter4/shield/src/Models/MyUserModel.php ' ;
63
+ command ('shield:model MyUserModel --namespace Tests ' );
64
+ $ filepath = Tests . 'MyUserModel.php ' ;
65
+
65
66
66
67
$ this ->assertStringContainsString ('File created: ' , CITestStreamFilter::$ buffer );
67
68
$ this ->assertFileExists ($ filepath );
68
69
69
- $ this ->assertStringContainsString ('namespace CodeIgniter\Shield\Models ; ' , $ this ->getFileContents ($ filepath ));
70
+ $ this ->assertStringContainsString ('namespace Tests ; ' , $ this ->getFileContents ($ filepath ));
70
71
$ this ->assertStringContainsString ('class MyUserModel extends UserModel ' , $ this ->getFileContents ($ filepath ));
71
72
$ this ->assertStringContainsString ('use CodeIgniter\Shield\Models\UserModel; ' , $ this ->getFileContents ($ filepath ));
72
73
$ this ->assertStringContainsString ('protected function initialize(): void ' , $ this ->getFileContents ($ filepath ));
@@ -92,7 +93,7 @@ public function testGenerateUserModelWithForce(): void
92
93
public function testGenerateUserModelWithSuffix (): void
93
94
{
94
95
command ('shield:model MyUser --suffix ' );
95
- $ filepath = APPPATH . 'Models\ MyUserModel.php ' ;
96
+ $ filepath = APPPATH . 'Models/ MyUserModel.php ' ;
96
97
97
98
$ this ->assertStringContainsString ('File created: ' , CITestStreamFilter::$ buffer );
98
99
$ this ->assertFileExists ($ filepath );
0 commit comments