Browse Source

Checks ValidatorInterface for upcoming Symfony versions

Jérôme Tamarelle 9 years ago
parent
commit
2c67e50c6e
1 changed files with 5 additions and 2 deletions
  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');
         }