浏览代码

Merge pull request #3597 from rafaelcalleja/PR_refactor_integration_test

Remove method version_compare used on Form component integration tests
Oskar Stark 9 年之前
父节点
当前提交
118a68e4f9
共有 1 个文件被更改,包括 2 次插入3 次删除
  1. 2 3
      Tests/Form/Widget/FormSonataFilterChoiceWidgetTest.php

+ 2 - 3
Tests/Form/Widget/FormSonataFilterChoiceWidgetTest.php

@@ -13,7 +13,6 @@ namespace Sonata\AdminBundle\Tests\Form\Widget;
 
 use Sonata\AdminBundle\Form\Type\Filter\ChoiceType;
 use Symfony\Component\Form\Tests\Fixtures\TestExtension;
-use Symfony\Component\HttpKernel\Kernel;
 
 class FormSonataFilterChoiceWidgetTest extends BaseWidgetTest
 {
@@ -64,7 +63,7 @@ class FormSonataFilterChoiceWidgetTest extends BaseWidgetTest
 
     protected function getParentClass()
     {
-        if (version_compare(Kernel::VERSION, '2.8.0', '>=')) {
+        if (class_exists('Symfony\Component\Form\Extension\Core\Type\RangeType')) {
             return 'Sonata\AdminBundle\Form\Type\Filter\ChoiceType';
         } else {
             return 'sonata_type_filter_choice';
@@ -73,7 +72,7 @@ class FormSonataFilterChoiceWidgetTest extends BaseWidgetTest
 
     protected function getChoiceClass()
     {
-        if (version_compare(Kernel::VERSION, '2.8.0', '>=')) {
+        if (class_exists('Symfony\Component\Form\Extension\Core\Type\RangeType')) {
             return 'Symfony\Component\Form\Extension\Core\Type\ChoiceType';
         } else {
             return 'choice';