Skip to content

Commit e5e774c

Browse files
committed
fix:
1 parent 2c839d2 commit e5e774c

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/Commands/UserModelGeneratorTest.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,13 @@ public function testGenerateUserModel(): void
6060

6161
public function testGenerateUserModelCustomNamespace(): void
6262
{
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';
6665

6766
$this->assertStringContainsString('File created: ', CITestStreamFilter::$buffer);
6867
$this->assertFileExists($filepath);
6968

70-
$this->assertStringContainsString('namespace Tests;', $this->getFileContents($filepath));
69+
$this->assertStringContainsString('namespace CodeIgniter\Shield\Models;', $this->getFileContents($filepath));
7170
$this->assertStringContainsString('class MyUserModel extends UserModel', $this->getFileContents($filepath));
7271
$this->assertStringContainsString('use CodeIgniter\Shield\Models\UserModel;', $this->getFileContents($filepath));
7372
$this->assertStringContainsString('protected function initialize(): void', $this->getFileContents($filepath));

0 commit comments

Comments
 (0)