Browse Source

[HttpKernel] excluded a test on PHP 5.3.16, which is buggy (PHP, not Symfony ;))

Fabien Potencier 12 years ago
parent
commit
9a355e995a

+ 9 - 5
tests/Symfony/Tests/Component/HttpKernel/Controller/ControllerResolverTest.php

@@ -119,11 +119,15 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase
         $request->attributes->set('foobar', 'foobar');
         $controller = array(new self(), 'controllerMethod3');
 
-        try {
-            $resolver->getArguments($request, $controller);
-            $this->fail('->getArguments() throws a \RuntimeException exception if it cannot determine the argument value');
-        } catch (\Exception $e) {
-            $this->assertInstanceOf('\RuntimeException', $e, '->getArguments() throws a \RuntimeException exception if it cannot determine the argument value');
+        if (version_compare(PHP_VERSION, '5.3.16', '==')) {
+            $this->markTestSkipped('PHP 5.3.16 has a major bug in the Reflection sub-system');
+        } else {
+            try {
+                $resolver->getArguments($request, $controller);
+                $this->fail('->getArguments() throws a \RuntimeException exception if it cannot determine the argument value');
+            } catch (\Exception $e) {
+                $this->assertInstanceOf('\RuntimeException', $e, '->getArguments() throws a \RuntimeException exception if it cannot determine the argument value');
+            }
         }
 
         $request = Request::create('/');