Completed
Push — v2.0.x ( 11273c...f488cd )
by Florent
04:53 queued 01:28
created

JWAManagerTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3
Metric Value
wmc 1
lcom 0
cbo 3
dl 0
loc 16
rs 10
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2014-2016 Spomky-Labs
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license.  See the LICENSE file for details.
10
 */
11
12
use Jose\Algorithm\Signature\ES256;
13
use Jose\Algorithm\Signature\ES384;
14
use Jose\Factory\AlgorithmManagerFactory;
15
use Jose\Test\TestCase;
16
17
/**
18
 * Class JWAManagerTest.
19
 */
20
class JWAManagerTest extends TestCase
21
{
22
    /**
23
     *
24
     */
25
    public function testAlgorithmIsSupported()
26
    {
27
        $jwa_manager = AlgorithmManagerFactory::createAlgorithmManager(['ES256', 'ES384']);
28
29
        $this->assertTrue($jwa_manager->isAlgorithmSupported('ES256'));
30
        $this->assertTrue($jwa_manager->isAlgorithmSupported('ES384'));
31
32
        $this->assertFalse($jwa_manager->isAlgorithmSupported('ES512'));
33
        $this->assertFalse($jwa_manager->isAlgorithmSupported('HS384'));
34
    }
35
}
36