GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Test Failed
Push — master ( 2c1dbb...6a0f46 )
by Matthias
03:18
created

ConfigurationTest::processSingleConfig()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
3
namespace Webfactory\ShortcodeBundle\Tests\DependencyInjection;
4
5
use PHPUnit\Framework\TestCase;
6
use Symfony\Component\Config\Definition\Processor;
7
use Webfactory\ShortcodeBundle\DependencyInjection\Configuration;
8
9
class ConfigurationTest extends TestCase
10
{
11
    /**
12
     * @test
13
     */
14
    public function configure_shortcode_with_controller_reference_only(): void
15
    {
16
        $processedConfig = $this->processSingleConfig(['shortcodes' => ['test-1' => 'Foo::bar']]);
17
18
        self::assertTrue(isset($processedConfig['shortcodes']['test-1']['controller']));
19
        self::assertSame('Foo::bar', $processedConfig['shortcodes']['test-1']['controller']);
20
    }
21
22
    /**
23
     * @test
24
     */
25
    public function configure_shortcode_with_controller_as_key(): void
26
    {
27
        $processedConfig = $this->processSingleConfig(['shortcodes' => ['test-1' => ['controller' => 'Foo::bar']]]);
28
29
        self::assertSame('Foo::bar', $processedConfig['shortcodes']['test-1']['controller']);
30
    }
31
32
    /**
33
     * @test
34
     */
35
    public function configure_shortcode_with_method(): void
36
    {
37
        $processedConfig = $this->processSingleConfig(['shortcodes' => ['test-1' => ['controller' => 'Foo::bar', 'method' => 'esi']]]);
38
39
        self::assertSame('esi', $processedConfig['shortcodes']['test-1']['method']);
40
    }
41
42
    private function processSingleConfig(array $config): array
43
    {
44
        return (new Processor())->processConfiguration(new Configuration(), [$config]);
45
    }
46
}
47