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.

FactoryTest::testGetCustom()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
dl 0
loc 4
c 1
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Emarref\Jwt\HeaderParameter;
4
5
class FactoryTest extends \PHPUnit_Framework_TestCase
6
{
7
    private static $classMap = [
8
        Algorithm::NAME                       => 'Emarref\Jwt\HeaderParameter\Algorithm',
9
        ContentType::NAME                     => 'Emarref\Jwt\HeaderParameter\ContentType',
10
        Critical::NAME                        => 'Emarref\Jwt\HeaderParameter\Critical',
11
        JsonWebKey::NAME                      => 'Emarref\Jwt\HeaderParameter\JsonWebKey',
12
        JwkSetUrl::NAME                       => 'Emarref\Jwt\HeaderParameter\JwkSetUrl',
13
        KeyId::NAME                           => 'Emarref\Jwt\HeaderParameter\KeyId',
14
        Type::NAME                            => 'Emarref\Jwt\HeaderParameter\Type',
15
        X509CertificateChain::NAME            => 'Emarref\Jwt\HeaderParameter\X509CertificateChain',
16
        X509CertificateSha1Thumbprint::NAME   => 'Emarref\Jwt\HeaderParameter\X509CertificateSha1Thumbprint',
17
        X509CertificateSha256Thumbprint::NAME => 'Emarref\Jwt\HeaderParameter\X509CertificateSha256Thumbprint',
18
        X509Url::NAME                         => 'Emarref\Jwt\HeaderParameter\X509Url',
19
    ];
20
21
    /**
22
     * @var Factory
23
     */
24
    private $factory;
25
26
    public function setUp()
27
    {
28
        $this->factory = new Factory();
29
    }
30
31
    public function testGetAlgorithm()
32
    {
33
        $this->assertInstanceOf(self::$classMap[Algorithm::NAME], $this->factory->get(Algorithm::NAME));
34
    }
35
36
    public function testGetContentType()
37
    {
38
        $this->assertInstanceOf(self::$classMap[ContentType::NAME], $this->factory->get(ContentType::NAME));
39
    }
40
41
    public function testGetCritical()
42
    {
43
        $this->assertInstanceOf(self::$classMap[Critical::NAME], $this->factory->get(Critical::NAME));
44
    }
45
46
    public function testGetJsonWebKey()
47
    {
48
        $this->assertInstanceOf(self::$classMap[JsonWebKey::NAME], $this->factory->get(JsonWebKey::NAME));
49
    }
50
51
    public function testGetJwkSetUrl()
52
    {
53
        $this->assertInstanceOf(self::$classMap[JwkSetUrl::NAME], $this->factory->get(JwkSetUrl::NAME));
54
    }
55
56
    public function testGetKeyId()
57
    {
58
        $this->assertInstanceOf(self::$classMap[KeyId::NAME], $this->factory->get(KeyId::NAME));
59
    }
60
61
    public function testGetType()
62
    {
63
        $this->assertInstanceOf(self::$classMap[Type::NAME], $this->factory->get(Type::NAME));
64
    }
65
66
    public function testGetX509CertificateChain()
67
    {
68
        $this->assertInstanceOf(self::$classMap[X509CertificateChain::NAME], $this->factory->get(X509CertificateChain::NAME));
69
    }
70
71
    public function testGetX509CertificateSha1Thumbprint()
72
    {
73
        $this->assertInstanceOf(self::$classMap[X509CertificateSha1Thumbprint::NAME], $this->factory->get(X509CertificateSha1Thumbprint::NAME));
74
    }
75
76
    public function testGetX509CertificateSha256Thumbprint()
77
    {
78
        $this->assertInstanceOf(self::$classMap[X509CertificateSha256Thumbprint::NAME], $this->factory->get(X509CertificateSha256Thumbprint::NAME));
79
    }
80
81
    public function testGetX509Url()
82
    {
83
        $this->assertInstanceOf(self::$classMap[X509Url::NAME], $this->factory->get(X509Url::NAME));
84
    }
85
86
    public function testGetCustom()
87
    {
88
        $this->assertInstanceOf('Emarref\Jwt\HeaderParameter\Custom', $this->factory->get('foo'));
89
    }
90
}
91