Completed
Push — pull-request/8219 ( b529c7 )
by Kamil
53:22 queued 33:38
created

SyliusThemeExtensionTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 3
dl 0
loc 27
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_does_not_register_a_provider_while_it_is_disabled() 0 10 1
A getContainerExtensions() 0 7 1
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\DependencyInjection\FilesystemSource;
13
14
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
15
use Sylius\Bundle\ThemeBundle\Configuration\Filesystem\FilesystemConfigurationSourceFactory;
16
use Sylius\Bundle\ThemeBundle\DependencyInjection\SyliusThemeExtension;
17
18
/**
19
 * @author Kamil Kokot <[email protected]>
20
 */
21
final class SyliusThemeExtensionTest extends AbstractExtensionTestCase
22
{
23
    /**
24
     * @test
25
     */
26
    public function it_does_not_register_a_provider_while_it_is_disabled()
27
    {
28
        $this->load(['sources' => ['filesystem' => false]]);
29
30
        $this->assertContainerBuilderHasServiceDefinitionWithArgument(
31
            'sylius.theme.configuration.provider',
32
            0,
33
            []
34
        );
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    protected function getContainerExtensions()
41
    {
42
        $themeExtension = new SyliusThemeExtension();
43
        $themeExtension->addConfigurationSourceFactory(new FilesystemConfigurationSourceFactory());
44
45
        return [$themeExtension];
46
    }
47
}
48