瀏覽代碼

merged branch aboks/yaml_inlinetest (PR #2602)

Commits
-------

e7acb23 [Yaml][Tests] Fixed missing locale string for Windows platforms which caused test to fail

Discussion
----------

[Yaml][Tests] Fixed missing locale string for Windows platforms

Bug fix: yes
Feature addition: no
Backwards compatibility break: no
Symfony2 tests pass: yes
Fixes the following tickets: -

On Windows all the locale formats supplied in the test do not work, causing the test to fail. The added locale string works correctly on (at least) Windows 7.
Fabien Potencier 13 年之前
父節點
當前提交
f8164ec380
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      tests/Symfony/Tests/Component/Yaml/InlineTest.php

+ 2 - 2
tests/Symfony/Tests/Component/Yaml/InlineTest.php

@@ -47,10 +47,10 @@ class InlineTest extends \PHPUnit_Framework_TestCase
             $this->markTestSkipped('Your platform does not support locales.');
         }
 
-        setlocale(LC_ALL, 'fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8');
+        setlocale(LC_ALL, 'fr_FR.UTF-8', 'fr_FR.UTF8', 'fr_FR.utf-8', 'fr_FR.utf8', 'French_France.1252');
 
         $this->assertEquals('1.2', Inline::dump(1.2));
-        $this->assertContains('fr', setlocale(LC_NUMERIC, 0));
+        $this->assertContains('fr', strtolower(setlocale(LC_NUMERIC, 0)));
 
         setlocale(LC_ALL, $locale);
     }