Completed
Push — tests-organisation ( e0cc56...d1374b )
by Kamil
20:01
created

SyliusThemeBundleTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 4

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 4
dl 0
loc 21
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A its_services_are_initializable() 0 15 2
1
<?php
2
3
/*
4
 * This file is part of the Sylius package.
5
 *
6
 * (c) Paweł Jędrzejewski
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 Sylius\Bundle\ThemeBundle\Tests\Functional;
13
14
use PHPUnit\Framework\Assert;
15
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
16
use Symfony\Component\DependencyInjection\Container;
17
18
/**
19
 * @author Magdalena Banasiak <[email protected]>
20
 */
21
final class SyliusThemeBundleTest extends KernelTestCase
22
{
23
    /**
24
     * @test
25
     */
26
    public function its_services_are_initializable()
27
    {
28
        static::bootKernel();
29
30
        /** @var Container $container */
31
        $container = self::$kernel->getContainer();
32
33
        $serviceIds = array_filter($container->getServiceIds(), function ($serviceId) {
34
            return 0 === strpos($serviceId, 'sylius.');
35
        });
36
37
        foreach ($serviceIds as $serviceId) {
38
            Assert::assertNotNull($container->get($serviceId));
39
        }
40
    }
41
}
42