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
Branch master (3aeb29)
by Rob
03:21
created

ConfigTest   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 104
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 39
c 0
b 0
f 0
dl 0
loc 104
rs 10
wmc 8
1
<?php
2
3
declare(strict_types=1);
4
5
namespace RattfieldNz\SafeUrls\Tests\Libraries\Config;
6
7
use RattfieldNz\SafeUrls\Libraries\Config\Config;
8
use RattfieldNz\SafeUrls\Tests\TestCase;
9
10
class ConfigTest extends TestCase
11
{
12
    protected function setUp(): void
13
    {
14
        parent::setUp();
15
    }
16
17
    /**
18
     * Test Google API key from config file.
19
     */
20
    public function testGoogleApiKey()
21
    {
22
        $expected = env('GOOGLE_API_KEY');
23
        $actual = Config::googleApiKey();
24
25
        $this->assertEquals($expected, $actual);
26
    }
27
28
    /**
29
     * Test Google API Client Id from config file.
30
     */
31
    public function testClientId()
32
    {
33
        $expected = env('GOOGLE_CLIENT_ID');
34
        $actual = Config::clientId();
35
36
        $this->assertEquals($expected, $actual);
37
    }
38
39
    /**
40
     * Test Google API Client Id from config file.
41
     */
42
    public function testClientVersion()
43
    {
44
        $expected = env('GOOGLE_CLIENT_VERSION');
45
        $actual = Config::clientVersion();
46
47
        $this->assertEquals($expected, $actual);
48
    }
49
50
    /**
51
     * Test Google API Threat Types from config file.
52
     */
53
    public function testAllThreatTypes()
54
    {
55
        $expected = [
56
            'THREAT_TYPE_UNSPECIFIED',
57
            'MALWARE',
58
            'SOCIAL_ENGINEERING',
59
            'UNWANTED_SOFTWARE',
60
            'POTENTIALLY_HARMFUL_APPLICATION',
61
        ];
62
63
        $actual = Config::threatTypes();
64
65
        $this->assertEquals($expected, $actual);
66
    }
67
68
    /**
69
     * Test Google API Platform Types from config file.
70
     */
71
    public function testAllPlatformTypes()
72
    {
73
        $expected = [
74
            'PLATFORM_TYPE_UNSPECIFIED',
75
            'WINDOWS',
76
            'LINUX',
77
            'ANDROID',
78
            'OSX',
79
            'IOS',
80
            'ANY_PLATFORM',
81
            'ALL_PLATFORMS',
82
            'CHROME',
83
        ];
84
85
        $actual = Config::platformTypes();
86
87
        $this->assertEquals($expected, $actual);
88
    }
89
90
    /**
91
     * Test Google API Threat Entry Types from config file.
92
     */
93
    public function testAllThreatEntryTypes()
94
    {
95
        $expected = [
96
            'URL',
97
            'THREAT_ENTRY_TYPE_UNSPECIFIED',
98
        ];
99
100
        $actual = Config::threatEntryTypes();
101
102
        $this->assertEquals($expected, $actual);
103
    }
104
105
    /**
106
     * Test Google API Curl Timeout from config file.
107
     */
108
    public function testCurlTimeout()
109
    {
110
        $expected = env('GOOGLE_CURL_TIMEOUT');
111
        $actual = Config::curlTimeout();
112
113
        $this->assertEquals($expected, $actual);
114
    }
115
}
116