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.

DotenvParserTest::envVarsProvider()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
/**
5
 * Created by PhpStorm.
6
 * User: benjamin
7
 * Date: 26/01/19
8
 * Time: 14:54.
9
 */
10
11
namespace Tests\Lib\Env\Parser;
12
13
use Lib\Env\Parser\DotenvParser;
14
use PHPUnit\Framework\TestCase;
15
16
class DotenvParserTest extends TestCase
17
{
18
    /** @var string */
19
    private $data;
20
21
    /** @var DotenvParser */
22
    private $parser;
23
24
    public function setUp()
25
    {
26
        $this->data = file_get_contents('./tests/fixtures/.env.test');
27
        $this->parser = new DotenvParser();
28
    }
29
30
    public function testDataIsParsed()
31
    {
32
        $result = $this->parser->parse($this->data);
33
        $this->assertIsArray($result);
34
    }
35
36
    /**
37
     * @dataProvider envVarsProvider
38
     */
39
    public function testValuesAreCorrect($name, $value)
40
    {
41
        $result = $this->parser->parse($this->data);
42
        $this->assertEquals($result[$name], $value);
43
    }
44
45
    public function envVarsProvider()
46
    {
47
        return [
48
            ['TEST_UNQUOTED_VALUE', 'foo'],
49
            ['TEST_QUOTED_VALUE', 'This value contains spaces'],
50
            ['TEST_UNQUOTED_SPECIAL_CHAR', '$fjhs|%::saqzrfgs#foo'],
51
            ['TEST_QUOTED_SPECIAL_CHARS', 'dg$ag,k@zrg%|qwdf#qsf'],
52
            ['TEST_STRIPPED_COMMENT', 'foo'],
53
        ];
54
    }
55
}
56