Skip to content

Commit f824ff9

Browse files
committed
(+) revert test
1 parent e0f6b6d commit f824ff9

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

tests/QueryTest.php

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ public function setUp(): void
2020
User::create(['name' => 'Tommy Toe', 'age' => 33, 'title' => 'user']);
2121
User::create(['name' => 'Yvonne Yoe', 'age' => 35, 'title' => 'admin']);
2222
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']);
2929
}
3030

3131
public function tearDown(): void
@@ -183,31 +183,31 @@ public function testWhereDate(): void
183183

184184
public function testWhereDay(): void
185185
{
186-
$day = Birthday::whereDay('birthday', 12)->get();
186+
$day = Birthday::whereDay('day', '12')->get();
187187
$this->assertCount(4, $day);
188188

189-
$day = Birthday::whereDay('birthday', 11)->get();
189+
$day = Birthday::whereDay('day', '11')->get();
190190
$this->assertCount(1, $day);
191191
}
192192

193193
public function testWhereMonth(): void
194194
{
195-
$month = Birthday::whereMonth('birthday', 4)->get();
195+
$month = Birthday::whereMonth('month', '04')->get();
196196
$this->assertCount(1, $month);
197197

198-
$month = Birthday::whereMonth('birthday', 5)->get();
198+
$month = Birthday::whereMonth('month', '05')->get();
199199
$this->assertCount(5, $month);
200200
}
201201

202202
public function testWhereYear(): void
203203
{
204-
$year = Birthday::whereYear('birthday', 2021)->get();
204+
$year = Birthday::whereYear('year', '2021')->get();
205205
$this->assertCount(4, $year);
206206

207-
$year = Birthday::whereYear('birthday', 2022)->get();
207+
$year = Birthday::whereYear('year', '2022')->get();
208208
$this->assertCount(1, $year);
209209

210-
$year = Birthday::whereYear('birthday', '<', 2021)->get();
210+
$year = Birthday::whereYear('year', '<', '2021')->get();
211211
$this->assertCount(1, $year);
212212
}
213213

0 commit comments

Comments
 (0)