Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
trasher committed Feb 12, 2024
1 parent 9eedd59 commit e50d7fb
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/GaletteAuto/tests/units/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,15 @@ public function testCrud(): void

$this->assertCount(2, $brand->getList());

$model = new \GaletteAuto\Model($this->zdb);
$this->assertCount(0, $model->getList());
$models = new \GaletteAuto\Repository\Models(
$this->zdb,
$this->preferences,
$this->login,
new \GaletteAuto\ModelsList()
);
$this->assertCount(0, $models->getList());

$model = new \GaletteAuto\Model($this->zdb);
$data = [];
$this->assertFalse($model->check($data));
$this->assertSame(
Expand Down Expand Up @@ -126,7 +132,9 @@ public function testCrud(): void
$this->assertTrue($model->check($data));
$this->assertTrue($model->store(true));

$this->assertCount(1, $model->getList());
$this->assertCount(1, $models->getList());
$this->assertCount(1, $models->getList($first_brand_id));
$this->assertCount(0, $models->getList($second_brand_id));

/*$this->assertCount(2, $brand->getList());
$this->assertSame('2 brands', $brand->displayCount());
Expand Down

0 comments on commit e50d7fb

Please sign in to comment.