AbstractTestKeyLoader::testLoadKeyFromWrongType()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
/*
3
 * This file is part of the Guarded Authentication package.
4
 *
5
 * (c) Jafar Jabr <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
namespace Jafar\Bundle\GuardedAuthenticationBundle\Tests\Api\KeyLoader;
12
13
use Jafar\Bundle\GuardedAuthenticationBundle\Api\KeyLoader\KeyLoaderInterface;
14
use PHPUnit\Framework\TestCase;
15
16
/**
17
 * Class AbstractTestKeyLoader.
18
 *
19
 * @author Jafar Jabr <[email protected]>
20
 */
21
abstract class AbstractTestKeyLoader extends TestCase
22
{
23
    /** @var KeyLoaderInterface */
24
    protected $keyLoader;
25
26
    /**
27
     * Test load key from invalid type.
28
     *
29
     * @expectedException        \InvalidArgumentException
30
     * @expectedExceptionMessage The key type must be "public" or "private", "wrongType" given.
31
     */
32
    public function testLoadKeyFromWrongType()
33
    {
34
        $this->keyLoader->loadKey('wrongType');
35
    }
36
}
37