Skip to content

Commit 7948aec

Browse files
author
coderswat
committed
updated tests
1 parent 4e9c250 commit 7948aec

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
vendor/
2-
tools/
2+
tools/
3+
.phpunit.result.cache

tests/GrapeTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,17 @@ public function test_getTimezone_function(): void
3434
$expected = "America/New_York";
3535
$this->assertEquals($timeZone, $expected);
3636
}
37+
public function test_toTime_function(): void
38+
{
39+
$time = Grape::time(1687350065)->toTime();
40+
$expected = '12:21:05';
41+
$this->assertEquals($time, $expected);
42+
}
43+
public function test_toRaw_function(): void
44+
{
45+
$time = Grape::time(1687350065)->toRaw();
46+
$expected = '2023-06-21 12:21:05';
47+
$this->assertEquals($time, $expected);
48+
}
49+
3750
}

0 commit comments

Comments
 (0)