Completed
Pull Request — 2.x (#556)
by Grégoire
03:14 queued 01:40
created

tests/Fixtures/App/Kernel.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

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
namespace Sonata\DoctrinePHPCRAdminBundle\Tests\Fixtures\App;
13
14
use ReflectionClass;
15
use Symfony\Cmf\Component\Testing\HttpKernel\TestKernel;
16
use Symfony\Component\Config\Loader\LoaderInterface;
17
18
class Kernel extends TestKernel
19
{
20
    public function configure()
21
    {
22
        $this->registerConfiguredBundles();
23
        $this->requireBundleSet('default');
24
        $this->requireBundleSets(['phpcr_odm']);
25
    }
26
27
    public function getKernelDir()
28
    {
29
        try {
30
            $refl = new ReflectionClass($this);
31
            $fname = $refl->getFileName();
32
            $kernelDir = dirname($fname);
33
34
            return $kernelDir;
35
        } catch (Execption $exception) {
0 ignored issues
show
Coding Style Comprehensibility introduced by
Consider adding a comment why this CATCH block is empty.
Loading history...
36
37
        }
38
    }
39
40
    public function registerContainerConfiguration(LoaderInterface $loader)
41
    {
42
        $loader->load(__DIR__ . '/config/config.php');
43
        $loader->load(__DIR__ . '/config/admin-test.xml');
44
    }
45
}
46