This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit e50d7fb committed Feb 12, 2024 · 21 / 29
1 parent 9eedd59 commit e50d7fb Copy full SHA for e50d7fb
File tree 1 file changed +11
-3
lines changed
tests/GaletteAuto/tests/units
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -84,9 +84,15 @@ public function testCrud(): void
84
84
85
85
$ this ->assertCount (2 , $ brand ->getList ());
86
86
87
- $ model = new \GaletteAuto \Model ($ this ->zdb );
88
- $ this ->assertCount (0 , $ model ->getList ());
87
+ $ models = new \GaletteAuto \Repository \Models (
88
+ $ this ->zdb ,
89
+ $ this ->preferences ,
90
+ $ this ->login ,
91
+ new \GaletteAuto \ModelsList ()
92
+ );
93
+ $ this ->assertCount (0 , $ models ->getList ());
89
94
95
+ $ model = new \GaletteAuto \Model ($ this ->zdb );
90
96
$ data = [];
91
97
$ this ->assertFalse ($ model ->check ($ data ));
92
98
$ this ->assertSame (
@@ -126,7 +132,9 @@ public function testCrud(): void
126
132
$ this ->assertTrue ($ model ->check ($ data ));
127
133
$ this ->assertTrue ($ model ->store (true ));
128
134
129
- $ this ->assertCount (1 , $ model ->getList ());
135
+ $ this ->assertCount (1 , $ models ->getList ());
136
+ $ this ->assertCount (1 , $ models ->getList ($ first_brand_id ));
137
+ $ this ->assertCount (0 , $ models ->getList ($ second_brand_id ));
130
138
131
139
/*$this->assertCount(2, $brand->getList());
132
140
$this->assertSame('2 brands', $brand->displayCount());
You can’t perform that action at this time.
0 commit comments