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 — 3.x (#76)
by Jindřich
01:45 queued 48s
created

ConfigTest::testConstructor()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 9

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 9
rs 9.9666
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Test\Skautis;
4
5
use Skautis\Config;
6
7
class ConfigTest extends \PHPUnit_Framework_TestCase
8
{
9
10
    public function testDefaultConfiguration(): void
11
    {
12
        $config = new Config('asd123');
13
14
        $this->assertEquals('asd123', $config->getAppId());
15
        $this->assertTrue($config->isTestMode());
16
        $this->assertTrue($config->isCacheEnabled());
17
        $this->assertTrue($config->isCompressionEnabled());
18
    }
19
20
    public function testTestModeEnabled(): void
21
    {
22
        $config = new Config('asd123', Config::TEST_MODE_ENABLED);
23
        $this->assertTrue($config->isTestMode());
24
    }
25
26
    public function testTestModeDisabled(): void
27
    {
28
        $config = new Config('asd123', Config::TEST_MODE_DISABLED);
29
        $this->assertFalse($config->isTestMode());
30
    }
31
32
    public function testCacheEnabled(): void
33
    {
34
        $config = new Config('asd123', Config::TEST_MODE_ENABLED, Config::CACHE_ENABLED);
35
        $this->assertTrue($config->isCacheEnabled());
36
    }
37
38
    public function testCacheDisabled(): void
39
    {
40
        $config = new Config('asd123', Config::TEST_MODE_ENABLED, Config::CACHE_DISABLED);
41
        $this->assertFalse($config->isCacheEnabled());
42
    }
43
44
    public function testCompressionEnabled(): void
45
    {
46
        $config = new Config('asd123', Config::TEST_MODE_ENABLED, Config::CACHE_DISABLED, Config::COMPRESSION_ENABLED);
47
        $this->assertTrue( $config->isCompressionEnabled());
48
    }
49
50
    public function testCompressionDisabled(): void
51
    {
52
        $config = new Config('asd123', Config::TEST_MODE_ENABLED, Config::CACHE_DISABLED, Config::COMPRESSION_DISABLED);
53
        $this->assertFalse( $config->isCompressionEnabled());
54
    }
55
56
    public function testBaseUrlTestModeEnabled(): void
57
    {
58
        $config = new Config('sad', Config::TEST_MODE_ENABLED);
59
        $this->assertStringStartsWith('https://test', $config->getBaseUrl());
60
    }
61
62
    public function testBaseUrlTestModeDisabled(): void
63
    {
64
        $config = new Config('sad', Config::TEST_MODE_DISABLED);
65
        $this->assertStringStartsWith('https://is.', $config->getBaseUrl());
66
    }
67
}
68