浏览代码

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

Fabien Potencier 12 年之前
父节点
当前提交
9a355e995a
共有 1 个文件被更改,包括 9 次插入5 次删除
  1. 9 5
      tests/Symfony/Tests/Component/HttpKernel/Controller/ControllerResolverTest.php

+ 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');
         $request->attributes->set('foobar', 'foobar');
         $controller = array(new self(), 'controllerMethod3');
         $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('/');
         $request = Request::create('/');