Completed
Push — fixtures/parameter-fix ( 1f3fd9...164a01 )
by Kamil
32:45
created

SyliusFixturesExtensionTest::it_processes_parameters_below_options_node()   B

Complexity

Conditions 1
Paths 1

Size

Total Lines 25
Code Lines 13

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 25
rs 8.8571
cc 1
eloc 13
nc 1
nop 0
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\FixturesBundle\Tests\DependencyInjection;
13
14
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
15
use Sylius\Bundle\FixturesBundle\DependencyInjection\SyliusFixturesExtension;
16
17
/**
18
 * @author Kamil Kokot <[email protected]>
19
 */
20
final class SyliusFixturesExtensionTest extends AbstractExtensionTestCase
21
{
22
    /**
23
     * @test
24
     */
25
    public function it_does_not_crash_if_no_suite_is_configured()
26
    {
27
        $this->load();
28
    }
29
30
    /**
31
     * @test
32
     */
33
    public function it_registers_configured_suites()
34
    {
35
        $this->load(['suites' => [
36
            'suite_name' => [],
37
        ]]);
38
39
        $suiteRegistryDefinition = $this->container->findDefinition('sylius_fixtures.suite_registry');
0 ignored issues
show
Comprehensibility Naming introduced by
The variable name $suiteRegistryDefinition exceeds the maximum configured length of 20.

Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.

Loading history...
40
        $suiteMethodCall = $suiteRegistryDefinition->getMethodCalls()[0];
41
42
        static::assertSame('addSuite', $suiteMethodCall[0]);
43
        static::assertSame('suite_name', $suiteMethodCall[1][0]);
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    protected function getContainerExtensions()
50
    {
51
        return [new SyliusFixturesExtension()];
52
    }
53
}
54