Passed
Push — master ( dd3c66...2ec375 )
by Ion
02:40
created

JtwTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 1 Features 1
Metric Value
wmc 1
eloc 4
c 1
b 1
f 1
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGenerateToken() 0 7 1
1
<?php
2
declare(strict_types=1);
3
4
namespace IonGhitun\JwtToken\Tests;
5
6
use IonGhitun\JwtToken\Exceptions\JwtException;
7
use IonGhitun\JwtToken\Jwt;
8
use PHPUnit\Framework\TestCase;
9
10
/**
11
 * Class JtwTest
12
 *
13
 * @package IonGhitun\JwtToken\Tests
14
 */
15
class JtwTest extends TestCase
16
{
17
    /**
18
     * Test generate and validate token
19
     *
20
     * @throws JwtException
21
     */
22
    public function testGenerateToken()
23
    {
24
        $payload = ['test' => 'phpunit'];
25
26
        $token = Jwt::generateToken($payload);
27
28
        $this->assertArrayHasKey('test', Jwt::validateToken($token));
29
    }
30
}
31