Skip to content

Commit e2c9762

Browse files
committed
add test to not like oepration fix
1 parent 05bdd81 commit e2c9762

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

tests/QueryTest.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,21 @@ public function testLike(): void
7171
$this->assertCount(1, $users);
7272
}
7373

74+
public function testNotLike(): void
75+
{
76+
$users = User::where('name', 'not like', '%doe')->get();
77+
$this->assertCount(7, $users);
78+
79+
$users = User::where('name', 'not like', '%y%')->get();
80+
$this->assertCount(6, $users);
81+
82+
$users = User::where('name', 'not LIKE', '%y%')->get();
83+
$this->assertCount(6, $users);
84+
85+
$users = User::where('name', 'not like', 't%')->get();
86+
$this->assertCount(8, $users);
87+
}
88+
7489
public function testSelect(): void
7590
{
7691
$user = User::where('name', 'John Doe')->select('name')->first();

0 commit comments

Comments
 (0)