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.

testCanRaiseExceptionWhenSetContentFromNonexistedFile()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace Gandung\JWT\Tests\Manager;
4
5
use PHPUnit\Framework\TestCase;
6
use Gandung\JWT\Manager\KeyManager;
7
8
/**
9
 * @author Paulus Gandung Prakosa <[email protected]>
10
 */
11
class KeyManagerTest extends TestCase
12
{
13
    public function testCanGetInstance()
14
    {
15
        $this->assertInstanceOf(KeyManager::class, new KeyManager);
16
    }
17
18
    public function testCanSetContentAndGetAfterwards()
19
    {
20
        $key = new KeyManager;
21
        $key->setContent('this is a dummy content.');
22
        $content = $key->getContent();
23
        $this->assertInternalType('string', $content);
24
        $this->assertNotEmpty($content);
25
        $this->assertEquals('this is a dummy content.', $content);
26
    }
27
28
    public function testCanSetPassphraseAndGetAfterwards()
29
    {
30
        $key = new KeyManager;
31
        $key->setPassphrase('secret123');
32
        $pass = $key->getPassphrase();
33
        $this->assertInternalType('string', $pass);
34
        $this->assertNotEmpty($pass);
35
        $this->assertEquals('secret123', $pass);
36
    }
37
38
    /**
39
     * @expectedException \InvalidArgumentException
40
     */
41
    public function testCanRaiseExceptionWhenSetContentFromNonexistedFile()
42
    {
43
        $key = new KeyManager;
44
        $key->setContentFromCertFile('cert/this_is_a_file_that_not_exists.pem');
45
    }
46
}
47