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

NoopProviderTest::supportsReturnsFalse()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
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