Issues (62)

Tests/DependencyInjection/ConfigurationTest.php (1 issue)

Labels
Severity
1
<?php
2
3
/*
4
 *
5
 * (c) Yaroslav Honcharuk <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Yarhon\RouteGuardBundle\Tests\DependencyInjection;
12
13
use PHPUnit\Framework\TestCase;
14
use Symfony\Component\Config\Definition\Processor;
15
use Yarhon\RouteGuardBundle\DependencyInjection\Configuration;
16
17
/**
18
 * @author Yaroslav Honcharuk <[email protected]>
19
 */
20
class ConfigurationTest extends TestCase
21
{
22
    public function testDefaults()
23
    {
24
        $input = [];
25
26
        $processor = $this->createPartialMock(Processor::class, []);
27
28
        $config = $processor->processConfiguration(new Configuration(), [$input]);
0 ignored issues
show
The method processConfiguration() does not exist on PHPUnit\Framework\MockObject\MockObject. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
        /** @scrutinizer ignore-call */ 
29
        $config = $processor->processConfiguration(new Configuration(), [$input]);

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
29
30
        $defaults = [
31
            'data_collector' => [
32
                'ignore_controllers' => [
33
                    'twig.controller.preview_error',
34
                    'web_profiler.controller.profiler',
35
                    'web_profiler.controller.router',
36
                    'web_profiler.controller.exception',
37
                ],
38
                'ignore_exceptions' => false,
39
            ],
40
            'twig' => [
41
                'tag_name' => 'route',
42
                'tag_variable_name' => '_route',
43
                'discover_routing_functions' => true,
44
            ],
45
        ];
46
47
        $this->assertEquals($defaults, $config);
48
    }
49
}
50