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.
Completed
Pull Request — master (#42)
by
unknown
02:34
created

ObfuscateTest::testObfuscate()   B

Complexity

Conditions 5
Paths 4

Size

Total Lines 13
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 5
eloc 9
nc 4
nop 0
dl 0
loc 13
rs 8.8571
c 1
b 0
f 0
1
<?php
2
3
namespace Tests;
4
5
class ObfuscateTest extends Base {
6
7
    const AFTER_PATH    = "/after";
8
    const BEFORE_PATH   = "/before";
9
    const EXPECTED_PATH = "/expected";
10
11
    protected function tearDown() {
12
        $files = glob(__DIR__ . self::AFTER_PATH . "/*");
13
        foreach ($files as $file) {
14
            unlink($file);
15
        }
16
        rmdir(__DIR__ . self::AFTER_PATH);
17
    }
18
19
    public function testObfuscate() {
20
        shell_exec("./bin/obfuscate obfuscate " . __DIR__ . self::BEFORE_PATH . " " . __DIR__ . self::AFTER_PATH . " --config=" . __DIR__ . "/config.yml");
21
        $expectedFileNames = scandir(__DIR__ . self::EXPECTED_PATH);
22
        foreach ($expectedFileNames as $expectedFileName) {
23
            if ($expectedFileName === '.' || $expectedFileName === '..') {
24
                continue;
25
            }
26
            if (!file_exists(__DIR__ . self::AFTER_PATH . "/" . $expectedFileName)) {
27
                $this->fail("{$expectedFileName} not found");
28
            }
29
            $this->assertEquals(file_get_contents(__DIR__ . self::EXPECTED_PATH . "/" . $expectedFileName), file_get_contents(__DIR__ . self::AFTER_PATH . "/" . $expectedFileName));
30
        }
31
    }
32
}