Przeglądaj źródła

merged branch stloyd/skip_test (PR #3004)

Commits
-------

4c44023 [Tests] Skip segfaulting form test

Discussion
----------

[Tests] Skip segfaulting form test when using PHP <= 5.3.2

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

http://travis-ci.org/#!/stloyd/symfony/jobs/461563
Fabien Potencier 13 lat temu
rodzic
commit
362d31d002

+ 9 - 1
tests/Symfony/Tests/Component/Form/Util/FormUtilTest.php

@@ -63,7 +63,6 @@ class FormUtilTest extends \PHPUnit_Framework_TestCase
             array(false, true),
 
             array(true, array()),
-            array(true, new \SplFixedArray(1)),
         );
     }
 
@@ -75,6 +74,15 @@ class FormUtilTest extends \PHPUnit_Framework_TestCase
         $this->assertSame($expected, FormUtil::isChoiceGroup($value));
     }
 
+    public function testIsChoiceGroupPart2()
+    {
+        if (version_compare(PHP_VERSION, '5.3.2') <= 0) {
+            $this->markTestSkipped('PHP prior to 5.3.3 has issue with SplFixedArrays - https://bugs.php.net/bug.php?id=50481');
+        }
+
+        $this->assertSame(true, FormUtil::isChoiceGroup(new \SplFixedArray(1)));
+    }
+
     public function isChoiceSelectedProvider()
     {
         return array(