Skip to content

Commit 41ebb29

Browse files
committed
Reflected Testing changes
1 parent e16c087 commit 41ebb29

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

Tests/Resources/app/AppKernel.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,16 @@ class AppKernel extends TestKernel
77
{
88
public function configure()
99
{
10-
$this->requireBundleSets(array(
11-
'default',
12-
'sonata_admin',
13-
'phpcr_odm',
14-
));
10+
$this->requireBundleSet('default');
11+
12+
if ('phpcr' === $this->environment) {
13+
$this->requireBundleSets(array(
14+
'phpcr_odm',
15+
'sonata_admin',
16+
));
17+
} elseif ('orm' === $this->environment) {
18+
$this->requireBundleSet('doctrine_orm');
19+
}
1520

1621
$this->addBundles(array(
1722
new \Symfony\Cmf\Bundle\RoutingBundle\CmfRoutingBundle(),
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
<?php
22

33
$loader->import(CMF_TEST_CONFIG_DIR.'/default.php');
4-
$loader->import(CMF_TEST_CONFIG_DIR.'/phpcr_odm.php'); // todo find some way to don't have this in the ORM config
54
$loader->import(CMF_TEST_CONFIG_DIR.'/doctrine_orm.php');
6-
$loader->import(CMF_TEST_CONFIG_DIR.'/sonata_admin.php');
75
$loader->import(__DIR__.'/cmf_routing.yml');
86
$loader->import(__DIR__.'/cmf_routing.orm.yml');

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"require-dev": {
2222
"symfony-cmf/core-bundle": "1.0.*",
23-
"symfony-cmf/testing": "1.0.*",
23+
"symfony-cmf/testing": "1.1.*",
2424
"sonata-project/doctrine-phpcr-admin-bundle": "1.0.*",
2525
"symfony/monolog-bundle": "2.2.*",
2626
"doctrine/orm": "2.3.*"

phpunit.xml.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,8 @@
3737
<server name="KERNEL_DIR" value="Tests/Resources/app" />
3838
</php>
3939

40+
<listeners>
41+
<listener class="Symfony\Cmf\Component\Testing\Phpunit\DatabaseTestListener" />
42+
</listeners>
43+
4044
</phpunit>

0 commit comments

Comments
 (0)