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.
Passed
Push — master ( a61459...2bd74e )
by Andrey
02:49
created

itShouldSkipWithCorrectKeyWithWrongValue()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Tests\AndreyOrs\BehatBootstrap;
4
5
use AndreyOrs\BehatBootstrap\BootstrapService;
6
7
class BootstrapServiceTest extends \PHPUnit\Framework\TestCase
8
{
9
    /**
10
     * @var BootstrapService
11
     */
12
    private $service;
13
14
    /**
15
     * Set up service
16
     */
17
    public function setUp()
18
    {
19
        $this->service = new BootstrapService();
20
    }
21
22
    /**
23
     * @test
24
     * @dataProvider getWrongScenarios
25
     *
26
     * @param array $config
27
     */
28
    public function itFailsOnWrongConfiguration(array $config)
29
    {
30
        self::assertFalse($this->service->load($config));
31
    }
32
33
    /**
34
     * @test
35
     */
36
    public function itShouldSkipWithCorrectKeyWithWrongValue()
37
    {
38
        self::assertTrue(
39
            $this->service->load(
40
                [
41
                    BootstrapService::CONFIGURATION_KEY => [
42
                        [
43
                            'wrong-key' => 'ls -la',
44
                        ],
45
                    ],
46
                ]
47
            )
48
        );
49
    }
50
51
    public function getWrongScenarios()
52
    {
53
        return [
54
            [
55
                'empty array' => [],
56
            ],
57
            [
58
                'wrong config' => ['wrong-key' => []],
59
            ],
60
            [
61
                'empty config' => [BootstrapService::CONFIGURATION_KEY => []],
62
            ],
63
        ];
64
    }
65
66
}
67