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.

testIfConstantValueExistsFromOpensslDependency()   A
last analyzed

Complexity

Conditions 4
Paths 2

Size

Total Lines 12
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 4
eloc 7
nc 2
nop 0
dl 0
loc 12
rs 9.2
c 0
b 0
f 0
1
<?php
2
3
namespace Gandung\JWT\Tests\Algorithm\RSA;
4
5
use PHPUnit\Framework\TestCase;
6
use Gandung\JWT\Algorithm\RSA\RS384;
7
use Gandung\JWT\Tests\Exception\ConstantFromExternalModuleNotFoundException;
8
9
/**
10
 * @author Paulus Gandung Prakosa <[email protected]>
11
 */
12
class RS384Test extends TestCase
13
{
14
    public function testIfConstantValueExistsFromOpensslDependency()
15
    {
16
        if (!defined('OPENSSL_ALGO_SHA256') ||
17
            !defined('OPENSSL_ALGO_SHA384') ||
18
            !defined('OPENSSL_ALGO_SHA512')) {
19
            throw new ConstantFromExternalModuleNotFoundException(
20
                "Install 'openssl' module first."
21
            );
22
        }
23
24
        $this->assertTrue(true);
25
    }
26
27
    public function testCanGetInstance()
28
    {
29
        $this->assertInstanceOf(RS384::class, new RS384);
30
    }
31
32
    public function testCanGetAlgorithm()
33
    {
34
        $rs384 = new RS384;
35
        $this->assertEquals(\OPENSSL_ALGO_SHA384, $rs384->getAlgorithm());
36
    }
37
38
    public function testCanGetAlgorithmAlias()
39
    {
40
        $rs384 = new RS384;
41
        $this->assertEquals(\Gandung\JWT\Token\Algorithm::RS384, $rs384->getAlgorithmAlias());
42
    }
43
}
44