@@ -31,6 +31,7 @@ public function setUp(): void
31
31
Birthday::create (['name ' => 'Robert Doe ' , 'birthday ' => new DateTimeImmutable ('2021-05-12 10:53:14 ' ), 'time ' => '10:53:14 ' ]);
32
32
Birthday::create (['name ' => 'Mark Moe ' , 'birthday ' => new DateTimeImmutable ('2021-05-12 10:53:15 ' ), 'time ' => '10:53:15 ' ]);
33
33
Birthday::create (['name ' => 'Mark Moe ' , 'birthday ' => new DateTimeImmutable ('2022-05-12 10:53:16 ' ), 'time ' => '10:53:16 ' ]);
34
+ Birthday::create (['name ' => 'Boo ' ]);
34
35
}
35
36
36
37
public function tearDown (): void
@@ -217,6 +218,9 @@ public function testWhereDate(): void
217
218
218
219
$ birthdayCount = Birthday::whereDate ('birthday ' , '<= ' , '2021-05-11 ' )->get ();
219
220
$ this ->assertCount (2 , $ birthdayCount );
221
+
222
+ $ birthdayCount = Birthday::whereDate ('birthday ' , '<> ' , '2021-05-11 ' )->get ();
223
+ $ this ->assertCount (5 , $ birthdayCount );
220
224
}
221
225
222
226
public function testWhereDay (): void
@@ -240,10 +244,10 @@ public function testWhereMonth(): void
240
244
$ this ->assertCount (5 , $ month );
241
245
242
246
$ month = Birthday::whereMonth ('birthday ' , '< ' , '10 ' )->get ();
243
- $ this ->assertCount (6 , $ month );
247
+ $ this ->assertCount (7 , $ month );
244
248
245
249
$ month = Birthday::whereMonth ('birthday ' , '<> ' , '5 ' )->get ();
246
- $ this ->assertCount (1 , $ month );
250
+ $ this ->assertCount (2 , $ month );
247
251
}
248
252
249
253
public function testWhereYear (): void
@@ -255,10 +259,10 @@ public function testWhereYear(): void
255
259
$ this ->assertCount (1 , $ year );
256
260
257
261
$ year = Birthday::whereYear ('birthday ' , '< ' , '2021 ' )->get ();
258
- $ this ->assertCount (1 , $ year );
262
+ $ this ->assertCount (2 , $ year );
259
263
260
264
$ year = Birthday::whereYear ('birthday ' , '<> ' , '2021 ' )->get ();
261
- $ this ->assertCount (2 , $ year );
265
+ $ this ->assertCount (3 , $ year );
262
266
}
263
267
264
268
public function testWhereTime (): void
0 commit comments