@@ -20,12 +20,12 @@ public function setUp(): void
20
20
User::create (['name ' => 'Tommy Toe ' , 'age ' => 33 , 'title ' => 'user ' ]);
21
21
User::create (['name ' => 'Yvonne Yoe ' , 'age ' => 35 , 'title ' => 'admin ' ]);
22
22
User::create (['name ' => 'Error ' , 'age ' => null , 'title ' => null ]);
23
- Birthday::create (['name ' => 'Mark Moe ' , 'birthday ' => Carbon:: parse ( '2020-04-10 10:53:11 ' )-> toDateTimeString () , 'time ' => '10:53:11 ' ]);
24
- Birthday::create (['name ' => 'Jane Doe ' , 'birthday ' => Carbon:: parse ( '2021-05-12 10:53: 12 ' )-> toDateTimeString () , 'time ' => '10:53:12 ' ]);
25
- Birthday::create (['name ' => 'Harry Hoe ' , 'birthday ' => Carbon:: parse ( '2021-05-11 10:53:13 ' )-> toDateTimeString () , 'time ' => '10:53:13 ' ]);
26
- Birthday::create (['name ' => 'Robert Doe ' , 'birthday ' => Carbon:: parse ( '2021-05-12 10:53:14 ' )-> toDateTimeString () , 'time ' => '10:53:14 ' ]);
27
- Birthday::create (['name ' => 'Mark Moe ' , 'birthday ' => Carbon:: parse ( '2021-05-12 10:53:15 ' )-> toDateTimeString () , 'time ' => '10:53:15 ' ]);
28
- Birthday::create (['name ' => 'Mark Moe ' , 'birthday ' => Carbon:: parse ( ' 2021 -05-12 10:53:16 ' )-> toDateTimeString () , 'time ' => '10:53:16 ' ]);
23
+ Birthday::create (['name ' => 'Mark Moe ' , 'birthday ' => '2020-04-10 ' , ' day ' => ' 10 ' , ' month ' => ' 04 ' , ' year ' => ' 2020 ' , 'time ' => '10:53:11 ' ]);
24
+ Birthday::create (['name ' => 'Jane Doe ' , 'birthday ' => '2021-05-12 ' , ' day ' => ' 12 ', ' month ' => ' 05 ' , ' year ' => ' 2021 ' , 'time ' => '10:53:12 ' ]);
25
+ Birthday::create (['name ' => 'Harry Hoe ' , 'birthday ' => '2021-05-11 ' , ' day ' => ' 11 ' , ' month ' => ' 05 ' , ' year ' => ' 2021 ' , 'time ' => '10:53:13 ' ]);
26
+ Birthday::create (['name ' => 'Robert Doe ' , 'birthday ' => '2021-05-12 ' , ' day ' => ' 12 ' , ' month ' => ' 05 ' , ' year ' => ' 2021 ' , 'time ' => '10:53:14 ' ]);
27
+ Birthday::create (['name ' => 'Mark Moe ' , 'birthday ' => '2021-05-12 ' , ' day ' => ' 12 ' , ' month ' => ' 05 ' , ' year ' => ' 2021 ' , 'time ' => '10:53:15 ' ]);
28
+ Birthday::create (['name ' => 'Mark Moe ' , 'birthday ' => ' 2022 -05-12' , ' day ' => ' 12 ' , ' month ' => ' 05 ' , ' year ' => ' 2022 ' , 'time ' => '10:53:16 ' ]);
29
29
}
30
30
31
31
public function tearDown (): void
@@ -183,31 +183,31 @@ public function testWhereDate(): void
183
183
184
184
public function testWhereDay (): void
185
185
{
186
- $ day = Birthday::whereDay ('birthday ' , 12 )->get ();
186
+ $ day = Birthday::whereDay ('day ' , ' 12 ' )->get ();
187
187
$ this ->assertCount (4 , $ day );
188
188
189
- $ day = Birthday::whereDay ('birthday ' , 11 )->get ();
189
+ $ day = Birthday::whereDay ('day ' , ' 11 ' )->get ();
190
190
$ this ->assertCount (1 , $ day );
191
191
}
192
192
193
193
public function testWhereMonth (): void
194
194
{
195
- $ month = Birthday::whereMonth ('birthday ' , 4 )->get ();
195
+ $ month = Birthday::whereMonth ('month ' , ' 04 ' )->get ();
196
196
$ this ->assertCount (1 , $ month );
197
197
198
- $ month = Birthday::whereMonth ('birthday ' , 5 )->get ();
198
+ $ month = Birthday::whereMonth ('month ' , ' 05 ' )->get ();
199
199
$ this ->assertCount (5 , $ month );
200
200
}
201
201
202
202
public function testWhereYear (): void
203
203
{
204
- $ year = Birthday::whereYear ('birthday ' , 2021 )->get ();
204
+ $ year = Birthday::whereYear ('year ' , ' 2021 ' )->get ();
205
205
$ this ->assertCount (4 , $ year );
206
206
207
- $ year = Birthday::whereYear ('birthday ' , 2022 )->get ();
207
+ $ year = Birthday::whereYear ('year ' , ' 2022 ' )->get ();
208
208
$ this ->assertCount (1 , $ year );
209
209
210
- $ year = Birthday::whereYear ('birthday ' , '< ' , 2021 )->get ();
210
+ $ year = Birthday::whereYear ('year ' , '< ' , ' 2021 ' )->get ();
211
211
$ this ->assertCount (1 , $ year );
212
212
}
213
213
0 commit comments