aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/languages/fr/UtilsFrTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/languages/fr/UtilsFrTest.php')
-rw-r--r--tests/languages/fr/UtilsFrTest.php25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/languages/fr/UtilsFrTest.php b/tests/languages/fr/UtilsFrTest.php
new file mode 100644
index 00000000..890308d3
--- /dev/null
+++ b/tests/languages/fr/UtilsFrTest.php
@@ -0,0 +1,25 @@
1<?php
2
3require_once 'tests/UtilsTest.php';
4
5
6class UtilsFrTest extends UtilsTest
7{
8 /**
9 * Test date_format().
10 */
11 public function testDateFormat()
12 {
13 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
14 $this->assertRegExp('/1 janvier 2017 (à )?10:11:12 UTC\+0?3(:00)?/', format_date($date));
15 }
16
17 /**
18 * Test date_format() using builtin PHP function strftime.
19 */
20 public function testDateFormatDefault()
21 {
22 $date = DateTime::createFromFormat('Ymd_His', '20170101_101112');
23 $this->assertEquals('dim. 01 janv. 2017 10:11:12 EAT', format_date($date, false));
24 }
25}