Completed
Push — master ( 8e72cd...be1b99 )
by Michał
04:13
created

getContainerExtensions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Dziki\MonologSentryBundle\Tests\Functional;
6
7
use Dziki\MonologSentryBundle\DependencyInjection\MonologSentryExtension;
8
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase;
9
10
class MonologSentryExtensionTest extends AbstractExtensionTestCase
11
{
12
    /**
13
     * @test
14
     * @covers \Dziki\MonologSentryBundle\DependencyInjection\MonologSentryExtension::load
15
     */
16
    public function checkIfServicesDefinedAccordingToConfig(): void
17
    {
18
        $this->load(
19
            [
20
                'user_context' => true,
21
                'user_agent_parser' => 'phpuseragent',
22
                'tags' => [
23
                    'test' => 'test',
24
                    'test2' => [
25
                        'name' => 'test2',
26
                        'value' => 'test2',
27
                    ],
28
                ],
29
            ]
30
        );
31
32
        $defaultServices = [
33
            'dziki.monolog_sentry_bundle.user_data_appending_subscribed_processor',
34
            'dziki\monologsentrybundle\useragent\phpuseragentparser',
35
            'dziki.monolog_sentry_bundle.browser_data_appending_subscribed_processor',
36
            'dziki.monolog_sentry_bundle.test_appending_processor',
37
            'dziki.monolog_sentry_bundle.test2_appending_processor',
38
        ];
39
40
        foreach ($defaultServices as $defaultService) {
41
            $this->assertContainerBuilderHasService($defaultService);
42
        }
43
    }
44
45
    protected function getContainerExtensions()
46
    {
47
        return [
48
            new MonologSentryExtension(),
49
        ];
50
    }
51
}
52