Skip to content

Commit a29e1f5

Browse files
committed
fix test to support thai locale
1 parent 619bcce commit a29e1f5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/phpunit/ThaidateTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ public function testThaidateFunctions()
1212
$timestamp = 1460619637;
1313

1414
$this->assertEquals('วันพฤหัสบดีที่ 14 เมษายน พ.ศ.2559', thaidate('วันlที่ j F พ.ศ.Y', $timestamp));
15+
$this->assertEquals('พฤ. 14 เม.ย. 59', thaistrftime('%a %d %b %y', $timestamp, true, array('th', 'th_TH.utf8', 'th_TH.UTF8', 'th_TH.utf-8', 'th_TH.UTF-8', 'th_TH', 'th-TH')));
1516
}// testThaidate
1617

1718

@@ -21,6 +22,7 @@ public function testThaidateClass()
2122
$Thaidate = new \Rundiz\Thaidate\Thaidate();
2223

2324
$this->assertEquals('วันพฤหัสบดีที่ 14 เมษายน พ.ศ.2559', $Thaidate->date('วันlที่ j F พ.ศ.Y', $timestamp));
25+
$this->assertEquals('พฤ. 14 เม.ย. 59', $Thaidate->strftime('%a %d %b %y', $timestamp, true, array('th', 'th_TH.utf8', 'th_TH.UTF8', 'th_TH.utf-8', 'th_TH.UTF-8', 'th_TH', 'th-TH')));
2426
}// testThaidateClass
2527

2628

0 commit comments

Comments
 (0)