Completed
Branch master (910c19)
by Dmitri
01:43
created

FactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 12
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Damax\Bundle\ApiAuthBundle\Tests\Key;
6
7
use Damax\Bundle\ApiAuthBundle\Key\Factory;
8
use Damax\Bundle\ApiAuthBundle\Key\Generator\FixedGenerator;
9
use PHPUnit\Framework\TestCase;
10
11
class FactoryTest extends TestCase
12
{
13
    /**
14
     * @test
15
     */
16
    public function it_creates_key()
17
    {
18
        $key = (new Factory(new FixedGenerator('XYZ')))->createKey('john.doe', 600);
19
20
        $this->assertEquals('XYZ', $key->key());
21
        $this->assertEquals('john.doe', $key->identity());
22
        $this->assertEquals(600, $key->ttl());
23
    }
24
}
25