Skip to content

Commit

Permalink
update test to make them work with SF2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Cédric G committed Jun 4, 2013
1 parent f8c02cc commit 61d59c9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
9 changes: 7 additions & 2 deletions Tests/Filter/Doctrine/DoctrineQueryBuilderUpdater.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use Lexik\Bundle\FormFilterBundle\Tests\Fixtures\Filter\FormType;

use Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\Loader\XmlFileLoader;
use Symfony\Component\DependencyInjection\ContainerBuilder;
Expand Down Expand Up @@ -225,8 +224,14 @@ protected function getContainer()

$container->getCompilerPassConfig()->setOptimizationPasses(array());
$container->getCompilerPassConfig()->setRemovingPasses(array());
$container->addCompilerPass(new RegisterKernelListenersPass());
$container->addCompilerPass(new FormDataExtractorPass());

if (class_exists('Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass')) {
$container->addCompilerPass(new \Symfony\Bundle\FrameworkBundle\DependencyInjection\Compiler\RegisterKernelListenersPass()); // SF < 2.3
} else {
$container->addCompilerPass(new \Symfony\Component\HttpKernel\DependencyInjection\RegisterListenersPass()); // SF 2.3
}

$container->compile();

return $container;
Expand Down
11 changes: 9 additions & 2 deletions Tests/vendors.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,26 @@

$revs = array(
'v2.1' => array(
'symfony' => 'v2.1.8',
'symfony' => 'v2.1.11',
'doctrine-common' => '2.3.0',
'doctrine-dbal' => '2.3.2',
'doctrine' => '2.3.2',
'doctrine-fixtures' => 'origin/master',
),
'v2.2' => array(
'symfony' => 'v2.2.0',
'symfony' => 'v2.2.2',
'doctrine-common' => '2.3.0',
'doctrine-dbal' => '2.3.2',
'doctrine' => '2.3.2',
'doctrine-fixtures' => 'origin/master',
),
'v2.3' => array(
'symfony' => 'v2.3.0',
'doctrine-common' => '2.3.0',
'doctrine-dbal' => '2.3.4',
'doctrine' => '2.3.4',
'doctrine-fixtures' => 'origin/master',
),
);

if (!isset($_SERVER['SYMFONY_VERSION'])) {
Expand Down

0 comments on commit 61d59c9

Please sign in to comment.