Completed
Push — 1.0 ( 92e65c...08f62c )
by Kamil
27:49
created

getContainerExtensions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
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
declare(strict_types=1);
13
14
namespace Sylius\Bundle\FixturesBundle\Tests\DependencyInjection;
15
16
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
17
use Sylius\Bundle\FixturesBundle\DependencyInjection\SyliusFixturesExtension;
18
19
final class SyliusFixturesExtensionTest extends AbstractExtensionTestCase
20
{
21
    /**
22
     * @test
23
     */
24
    public function it_does_not_crash_if_no_suite_is_configured(): void
25
    {
26
        $this->load();
27
    }
28
29
    /**
30
     * @test
31
     */
32
    public function it_registers_configured_suites(): void
33
    {
34
        $this->load(['suites' => [
35
            'suite_name' => [],
36
        ]]);
37
38
        $suiteRegistryDefinition = $this->container->findDefinition('sylius_fixtures.suite_registry');
39
        $suiteMethodCall = $suiteRegistryDefinition->getMethodCalls()[0];
40
41
        static::assertSame('addSuite', $suiteMethodCall[0]);
42
        static::assertSame('suite_name', $suiteMethodCall[1][0]);
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    protected function getContainerExtensions(): array
49
    {
50
        return [new SyliusFixturesExtension()];
51
    }
52
}
53