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::testUnknownEncryption()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace Emarref\Jwt\Encryption;
4
5
use Emarref\Jwt\Algorithm;
6
7
class FactoryTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testAsymmetricCreation()
10
    {
11
        $expectedEncryptionInstance = 'Emarref\Jwt\Encryption\Asymmetric';
12
13
        $algorithm = new Algorithm\Rs256();
14
15
        $this->assertInstanceOf($expectedEncryptionInstance, Factory::create($algorithm));
16
    }
17
18
    public function testSymmetricCreation()
19
    {
20
        $expectedEncryptionInstance = 'Emarref\Jwt\Encryption\Symmetric';
21
22
        $algorithm = new Algorithm\Hs256('secret');
23
24
        $this->assertInstanceOf($expectedEncryptionInstance, Factory::create($algorithm));
25
    }
26
27
    /**
28
     * @expectedException \InvalidArgumentException
29
     * @expectedExceptionMessage Algorithm of class "Emarref\Jwt\Encryption\UnknownAlgorithmStub" is neither symmetric or asymmetric.
30
     */
31
    public function testUnknownEncryption()
32
    {
33
        $algorithm = new UnknownAlgorithmStub();
34
35
        Factory::create($algorithm);
36
    }
37
}
38