Browse Source

update test to work with a standard symfony install

Thomas Rabaix 13 năm trước cách đây
mục cha
commit
a1ff63b634

+ 1 - 1
Tests/Filter/ORM/ModelFilterTest.php

@@ -103,6 +103,6 @@ class ModelFilterTest extends \PHPUnit_Framework_TestCase
 
 
         $filter->apply($builder, array('type' => ChoiceType::TYPE_CONTAINS, 'value' => 'asd'));
         $filter->apply($builder, array('type' => ChoiceType::TYPE_CONTAINS, 'value' => 'asd'));
 
 
-        $this->assertEquals(array('o.field_name', 'field_name.id = :field_name'), $builder->query);
+        $this->assertEquals(array('o.field_name', 's_field_name.id = :field_name'), $builder->query);
     }
     }
 }
 }

+ 15 - 0
Tests/tests/bootstrap.php

@@ -0,0 +1,15 @@
+<?php
+
+/*
+ * this file is part of the symfony package.
+ *
+ * (c) fabien potencier <fabien.potencier@symfony-project.com>
+ *
+ * for the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+$rootDir = __DIR__.'/../../../../../../';
+
+require_once $rootDir.'/vendor/symfony/src/Symfony/Component/ClassLoader/UniversalClassLoader.php';
+require_once $rootDir.'/app/autoload.php';

+ 1 - 1
phpunit.xml.dist

@@ -9,7 +9,7 @@
          processIsolation="false"
          processIsolation="false"
          stopOnFailure="false"
          stopOnFailure="false"
          syntaxCheck="false"
          syntaxCheck="false"
-         bootstrap="../../autoload.php"
+         bootstrap="Tests/tests/bootstrap.php"
 >
 >
     <testsuites>
     <testsuites>
         <testsuite name="AdminBundle Test Suite">
         <testsuite name="AdminBundle Test Suite">