Skip to content

Commit 9cc0885

Browse files
committed
added integer, float, (string)integer and (string)float cases to test unit
1 parent c077f27 commit 9cc0885

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/RangerTest.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,10 +249,9 @@ public function testIssue8()
249249
public function testIssue9()
250250
{
251251
$r = new Ranger('en');
252-
// $r->setTimeType(IntlDateFormatter::SHORT);
253-
$from = "1662336000";
254-
$to = "1662940800";
255-
$result = $r->format($from, $to);
256-
$this->assertEquals('Sep 5–12, 2022', $result);
252+
$this->assertEquals('Sep 5–12, 2022', $r->format(1662336000, 1662940800));
253+
$this->assertEquals('Sep 5–12, 2022', $r->format(1662336000.5, 1662940800.5));
254+
$this->assertEquals('Sep 5–12, 2022', $r->format("1662336000", "1662940800"));
255+
$this->assertEquals('Sep 5–12, 2022', $r->format("1662336000.5", "1662940800.5"));
257256
}
258257
}

0 commit comments

Comments
 (0)