Skip to content

Commit dd413de

Browse files
committed
Fix test
1 parent a3bcbe9 commit dd413de

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tests/QueryTest.php

+13-13
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ public function testWhere(): void
4242
$this->assertCount(1, $users);
4343

4444
$users = User::where('age', '!=', 35)->get();
45-
$this->assertCount(6, $users);
45+
$this->assertCount(7, $users);
4646

4747
$users = User::where('age', '<>', 35)->get();
48-
$this->assertCount(6, $users);
48+
$this->assertCount(7, $users);
4949
}
5050

5151
public function testAndWhere(): void
@@ -87,16 +87,16 @@ public function testLike(): void
8787
public function testNotLike(): void
8888
{
8989
$users = User::where('name', 'not like', '%doe')->get();
90-
$this->assertCount(7, $users);
90+
$this->assertCount(8, $users);
9191

9292
$users = User::where('name', 'not like', '%y%')->get();
93-
$this->assertCount(6, $users);
93+
$this->assertCount(7, $users);
9494

9595
$users = User::where('name', 'not LIKE', '%y%')->get();
96-
$this->assertCount(6, $users);
96+
$this->assertCount(7, $users);
9797

9898
$users = User::where('name', 'not like', 't%')->get();
99-
$this->assertCount(8, $users);
99+
$this->assertCount(9, $users);
100100
}
101101

102102
public function testSelect(): void
@@ -156,7 +156,7 @@ public function testIn(): void
156156
$this->assertCount(6, $users);
157157

158158
$users = User::whereNotIn('age', [33, 35])->get();
159-
$this->assertCount(4, $users);
159+
$this->assertCount(5, $users);
160160

161161
$users = User::whereNotNull('age')
162162
->whereNotIn('age', [33, 35])->get();
@@ -166,7 +166,7 @@ public function testIn(): void
166166
public function testWhereNull(): void
167167
{
168168
$users = User::whereNull('age')->get();
169-
$this->assertCount(1, $users);
169+
$this->assertCount(2, $users);
170170
}
171171

172172
public function testWhereNotNull(): void
@@ -199,7 +199,7 @@ public function testOrder(): void
199199
public function testGroupBy(): void
200200
{
201201
$users = User::groupBy('title')->get();
202-
$this->assertCount(3, $users);
202+
$this->assertCount(4, $users);
203203

204204
$users = User::groupBy('age')->get();
205205
$this->assertCount(6, $users);
@@ -229,11 +229,11 @@ public function testGroupBy(): void
229229
public function testCount(): void
230230
{
231231
$count = User::where('age', '<>', 35)->count();
232-
$this->assertEquals(6, $count);
232+
$this->assertEquals(7, $count);
233233

234234
// Test for issue #165
235235
$count = User::select('_id', 'age', 'title')->where('age', '<>', 35)->count();
236-
$this->assertEquals(6, $count);
236+
$this->assertEquals(7, $count);
237237
}
238238

239239
public function testExists(): void
@@ -331,12 +331,12 @@ public function testPaginate(): void
331331
$results = User::paginate(2);
332332
$this->assertEquals(2, $results->count());
333333
$this->assertNotNull($results->first()->title);
334-
$this->assertEquals(9, $results->total());
334+
$this->assertEquals(10, $results->total());
335335

336336
$results = User::paginate(2, ['name', 'age']);
337337
$this->assertEquals(2, $results->count());
338338
$this->assertNull($results->first()->title);
339-
$this->assertEquals(9, $results->total());
339+
$this->assertEquals(10, $results->total());
340340
$this->assertEquals(1, $results->currentPage());
341341
}
342342

0 commit comments

Comments
 (0)