Completed
Push — master ( 3f74db...61022b )
by Vincent
15s queued 11s
created

ConfigurationTest::testDefault()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 24

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 9.536
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
/*
6
 * This file is part of the Sonata Project package.
7
 *
8
 * (c) Thomas Rabaix <[email protected]>
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Sonata\NotificationBundle\Tests\DependencyInjection;
15
16
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionConfigurationTestCase;
17
use Sonata\NotificationBundle\Admin\MessageAdmin;
18
use Sonata\NotificationBundle\DependencyInjection\Configuration;
19
use Sonata\NotificationBundle\DependencyInjection\SonataNotificationExtension;
20
use Symfony\Component\Config\Definition\ConfigurationInterface;
21
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
22
23
final class ConfigurationTest extends AbstractExtensionConfigurationTestCase
24
{
25
    public function testDefault(): void
26
    {
27
        $this->assertProcessedConfigurationEquals([
28
            'backend' => 'sonata.notification.backend.runtime',
29
            'queues' => [],
30
            'consumers' => [
31
                'register_default' => true,
32
            ],
33
            'iteration_listeners' => [],
34
            'class' => [
35
                'message' => 'App\Entity\Message',
36
            ],
37
            'admin' => [
38
                'enabled' => false,
39
                'message' => [
40
                    'class' => MessageAdmin::class,
41
                    'controller' => 'SonataNotificationBundle:MessageAdmin',
42
                    'translation' => 'SonataNotificationBundle',
43
                ],
44
            ],
45
        ], [
46
            __DIR__.'/../Fixtures/configuration.yaml',
47
        ]);
48
    }
49
50
    protected function getContainerExtension(): ExtensionInterface
51
    {
52
        return new SonataNotificationExtension();
53
    }
54
55
    protected function getConfiguration(): ConfigurationInterface
56
    {
57
        return new Configuration();
58
    }
59
}
60