Skip to content

Commit c2206e4

Browse files
committed
add sonata_admin_orm and sonata_admin_phpcr bundle sets
1 parent 3ee936d commit c2206e4

File tree

3 files changed

+35
-5
lines changed

3 files changed

+35
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changelog
44
1.1.0-RC2
55
---------
66

7+
* **2014-04-24**: add bundle sets: sonata_admin_orm and sonata_admin_phpcr
78
* **2014-04-11**: drop Symfony 2.2 compatibility
89

910
1.1.0-RC1

src/Symfony/Cmf/Component/Testing/HttpKernel/TestKernel.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,26 @@ public function init()
6363
'FOS\JsRoutingBundle\FOSJsRoutingBundle',
6464
));
6565

66+
$this->registerBundleSet('sonata_admin_orm', array(
67+
'\Sonata\BlockBundle\SonataBlockBundle',
68+
'\Sonata\CoreBundle\SonataCoreBundle',
69+
'\Sonata\AdminBundle\SonataAdminBundle',
70+
'\Sonata\jQueryBundle\SonatajQueryBundle',
71+
'Knp\Bundle\MenuBundle\KnpMenuBundle',
72+
'FOS\JsRoutingBundle\FOSJsRoutingBundle',
73+
));
74+
75+
$this->registerBundleSet('sonata_admin_phpcr', array(
76+
'\Sonata\BlockBundle\SonataBlockBundle',
77+
'\Sonata\CoreBundle\SonataCoreBundle',
78+
'\Sonata\AdminBundle\SonataAdminBundle',
79+
'\Sonata\jQueryBundle\SonatajQueryBundle',
80+
'Knp\Bundle\MenuBundle\KnpMenuBundle',
81+
'\Sonata\DoctrinePHPCRAdminBundle\SonataDoctrinePHPCRAdminBundle',
82+
'Symfony\Cmf\Bundle\TreeBrowserBundle\CmfTreeBrowserBundle',
83+
'FOS\JsRoutingBundle\FOSJsRoutingBundle',
84+
));
85+
6686
parent::init();
6787
$this->configure();
6888
}

tests/HttpKernel/TestKernelTest.php

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,23 @@ public function setUp()
2727
);
2828
}
2929

30-
public function testBundleSetRequire()
30+
/**
31+
* @dataProvider bundleSetProvider
32+
*/
33+
public function testBundleSetRequire(array $bundleSets, $count)
3134
{
3235
$this->kernel->init();
33-
$this->kernel->requireBundleSets(array(
34-
'default', 'phpcr_odm'
35-
));
36+
$this->kernel->requireBundleSets($bundleSets);
3637
$bundles = $this->kernel->registerBundles();
37-
$this->assertCount(6, $bundles);
38+
$this->assertCount($count, $bundles);
39+
}
40+
41+
public function bundleSetProvider()
42+
{
43+
return array(
44+
array(array('default', 'phpcr_odm'), 6),
45+
array(array('default', 'doctrine_orm'), 5),
46+
);
3847
}
3948

4049
public function testBundleAdd()

0 commit comments

Comments
 (0)