|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/* |
|
4
|
|
|
* This file is part of the Sonata Project package. |
|
5
|
|
|
* |
|
6
|
|
|
* (c) Thomas Rabaix <[email protected]> |
|
7
|
|
|
* |
|
8
|
|
|
* For the full copyright and license information, please view the LICENSE |
|
9
|
|
|
* file that was distributed with this source code. |
|
10
|
|
|
*/ |
|
11
|
|
|
|
|
12
|
|
|
use Symfony\Cmf\Component\Testing\HttpKernel\TestKernel; |
|
13
|
|
|
use Symfony\Component\Config\Loader\LoaderInterface; |
|
14
|
|
|
|
|
15
|
|
|
class AppKernel extends TestKernel |
|
16
|
|
|
{ |
|
17
|
|
|
public function configure() |
|
18
|
|
|
{ |
|
19
|
|
|
$this->registerBundleSet('sonata_admin_phpcr', [ |
|
20
|
|
|
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class, |
|
21
|
|
|
Knp\Bundle\MenuBundle\KnpMenuBundle::class, |
|
22
|
|
|
Sonata\AdminBundle\SonataAdminBundle::class, |
|
23
|
|
|
Sonata\CoreBundle\SonataCoreBundle::class, |
|
24
|
|
|
Sonata\BlockBundle\SonataBlockBundle::class, |
|
25
|
|
|
Sonata\DoctrinePHPCRAdminBundle\SonataDoctrinePHPCRAdminBundle::class, |
|
26
|
|
|
Symfony\Bundle\TwigBundle\TwigBundle::class, |
|
27
|
|
|
Symfony\Cmf\Bundle\TreeBrowserBundle\CmfTreeBrowserBundle::class, |
|
28
|
|
|
]); |
|
29
|
|
|
|
|
30
|
|
|
$this->requireBundleSet('default'); |
|
31
|
|
|
|
|
32
|
|
|
$this->requireBundleSets([ |
|
33
|
|
|
'phpcr_odm', |
|
34
|
|
|
'sonata_admin_phpcr', |
|
35
|
|
|
]); |
|
36
|
|
|
|
|
37
|
|
|
$this->addBundles([ |
|
38
|
|
|
new Symfony\Cmf\Bundle\ResourceBundle\CmfResourceBundle(), |
|
39
|
|
|
new Symfony\Cmf\Bundle\ResourceRestBundle\CmfResourceRestBundle(), |
|
40
|
|
|
new JMS\SerializerBundle\JMSSerializerBundle(), |
|
41
|
|
|
]); |
|
42
|
|
|
} |
|
43
|
|
|
|
|
44
|
|
|
public function registerContainerConfiguration(LoaderInterface $loader) |
|
45
|
|
|
{ |
|
46
|
|
|
$loader->load(__DIR__.'/config/config.php'); |
|
47
|
|
|
$loader->load(__DIR__.'/config/admin-test.xml'); |
|
48
|
|
|
} |
|
49
|
|
|
} |
|
50
|
|
|
|