Definition at line 12 of file CompilerTest.php.
◆ testReprNumericValueWithLocale()
Twig_Tests_CompilerTest::testReprNumericValueWithLocale |
( |
| ) |
|
Definition at line 14 of file CompilerTest.php.
18 $locale = setlocale(LC_NUMERIC, 0);
19 if (
false === $locale) {
20 $this->markTestSkipped(
'Your platform does not support locales.');
23 $required_locales = array(
'fr_FR.UTF-8',
'fr_FR.UTF8',
'fr_FR.utf-8',
'fr_FR.utf8',
'French_France.1252');
24 if (
false === setlocale(LC_NUMERIC, $required_locales)) {
25 $this->markTestSkipped(
'Could not set any of required locales: '.implode(
', ', $required_locales));
28 $this->assertEquals(
'1.2', $compiler->repr(1.2)->getSource());
29 $this->assertContains(
'fr', strtolower(setlocale(LC_NUMERIC, 0)));
31 setlocale(LC_NUMERIC, $locale);
Stores the Twig configuration.
The documentation for this class was generated from the following file: