Skip to content

Commit 42818bb

Browse files
committed
test: update generated model expectations
Signed-off-by: memleakd <121398829+memleakd@users.noreply.github.com>
1 parent c650a35 commit 42818bb

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

tests/system/Commands/Generators/ModelGeneratorTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public function testGenerateModel(): void
5353
$file = APPPATH . 'Models/User.php';
5454
$this->assertFileExists($file);
5555
$this->assertStringContainsString('extends Model', $this->getFileContent($file));
56-
$this->assertStringContainsString('protected $table = \'users\';', $this->getFileContent($file));
57-
$this->assertStringContainsString('protected $returnType = \'array\';', $this->getFileContent($file));
56+
$this->assertStringContainsString('protected $table = \'users\';', $this->getFileContent($file));
57+
$this->assertStringContainsString('protected $returnType = \'array\';', $this->getFileContent($file));
5858
}
5959

6060
public function testGenerateModelWithOptionTable(): void
@@ -63,7 +63,7 @@ public function testGenerateModelWithOptionTable(): void
6363
$this->assertStringContainsString('File created: ', $this->getStreamFilterBuffer());
6464
$file = APPPATH . 'Models/Cars.php';
6565
$this->assertFileExists($file);
66-
$this->assertStringContainsString('protected $table = \'utilisateur\';', $this->getFileContent($file));
66+
$this->assertStringContainsString('protected $table = \'utilisateur\';', $this->getFileContent($file));
6767
}
6868

6969
public function testGenerateModelWithOptionDBGroup(): void
@@ -72,7 +72,7 @@ public function testGenerateModelWithOptionDBGroup(): void
7272
$this->assertStringContainsString('File created: ', $this->getStreamFilterBuffer());
7373
$file = APPPATH . 'Models/User.php';
7474
$this->assertFileExists($file);
75-
$this->assertStringContainsString('protected $DBGroup = \'testing\';', $this->getFileContent($file));
75+
$this->assertStringContainsString('protected $DBGroup = \'testing\';', $this->getFileContent($file));
7676
}
7777

7878
public function testGenerateModelWithOptionReturnArray(): void
@@ -81,7 +81,7 @@ public function testGenerateModelWithOptionReturnArray(): void
8181
$this->assertStringContainsString('File created: ', $this->getStreamFilterBuffer());
8282
$file = APPPATH . 'Models/User.php';
8383
$this->assertFileExists($file);
84-
$this->assertStringContainsString('protected $returnType = \'array\';', $this->getFileContent($file));
84+
$this->assertStringContainsString('protected $returnType = \'array\';', $this->getFileContent($file));
8585
}
8686

8787
public function testGenerateModelWithOptionReturnObject(): void
@@ -90,7 +90,7 @@ public function testGenerateModelWithOptionReturnObject(): void
9090
$this->assertStringContainsString('File created: ', $this->getStreamFilterBuffer());
9191
$file = APPPATH . 'Models/User.php';
9292
$this->assertFileExists($file);
93-
$this->assertStringContainsString('protected $returnType = \'object\';', $this->getFileContent($file));
93+
$this->assertStringContainsString('protected $returnType = \'object\';', $this->getFileContent($file));
9494
}
9595

9696
public function testGenerateModelWithOptionReturnEntity(): void
@@ -100,7 +100,7 @@ public function testGenerateModelWithOptionReturnEntity(): void
100100

101101
$file = APPPATH . 'Models/User.php';
102102
$this->assertFileExists($file);
103-
$this->assertStringContainsString('protected $returnType = \App\Entities\User::class;', $this->getFileContent($file));
103+
$this->assertStringContainsString('protected $returnType = \App\Entities\User::class;', $this->getFileContent($file));
104104

105105
if (is_file($file)) {
106106
unlink($file);

0 commit comments

Comments
 (0)