Completed
Push — master ( 231cf5...6b8ce2 )
by John
03:01
created

NoopProviderTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 21
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A authenticateThrowsException() 0 6 1
A supportsReturnsFalse() 0 5 1
1
<?php declare(strict_types = 1);
2
/*
3
 * This file is part of the KleijnWeb\SwaggerBundle package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
9
namespace KleijnWeb\SwaggerBundle\Tests\Security;
10
11
use KleijnWeb\SwaggerBundle\Security\NoopProvider;
12
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
13
14
/**
15
 * @author John Kleijn <[email protected]>
16
 */
17
class NoopProviderTest extends \PHPUnit_Framework_TestCase
18
{
19
    /**
20
     * @test
21
     */
22
    public function authenticateThrowsException()
23
    {
24
        $provider = new NoopProvider();
25
        $this->expectException(\BadMethodCallException::class);
26
        $provider->authenticate($this->getMockForAbstractClass(TokenInterface::class));
27
    }
28
29
    /**
30
     * @test
31
     */
32
    public function supportsReturnsFalse()
33
    {
34
        $provider = new NoopProvider();
35
        $this->assertFalse($provider->supports($this->getMockForAbstractClass(TokenInterface::class)));
36
    }
37
}
38