Explorar o código

Checks ValidatorInterface for upcoming Symfony versions

Jérôme Tamarelle %!s(int64=9) %!d(string=hai) anos
pai
achega
2c67e50c6e
Modificáronse 1 ficheiros con 5 adicións e 2 borrados
  1. 5 2
      Tests/Controller/HelperControllerTest.php

+ 5 - 2
Tests/Controller/HelperControllerTest.php

@@ -729,9 +729,12 @@ class HelperControllerTest extends \PHPUnit_Framework_TestCase
     {
         $data = array();
 
-        $data['2.4'] = array('Symfony\Component\Validator\ValidatorInterface');
+        // For Symfony <= 2.8
+        if (interface_exists('Symfony\Component\Validator\ValidatorInterface')) {
+            $data['2.4'] = array('Symfony\Component\Validator\ValidatorInterface');
+        }
 
-        // For Symfony 2.5+
+        // For Symfony >= 2.5
         if (interface_exists('Symfony\Component\Validator\Validator\ValidatorInterface')) {
             $data['2.5'] = array('Symfony\Component\Validator\Validator\ValidatorInterface');
         }