Test Setup Failed
Pull Request — master (#146)
by
unknown
02:42
created

RefreshTokenAuthenticatorSpec::it_supports_token()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 2
1
<?php
2
3
namespace spec\Gesdinet\JWTRefreshTokenBundle\Security\Authenticator;
4
5
use PhpSpec\ObjectBehavior;
6
use Symfony\Component\HttpFoundation\Request;
7
use Symfony\Component\Security\Core\Exception\AuthenticationException;
8
use Symfony\Component\Security\Core\User\UserCheckerInterface;
9
10
class RefreshTokenAuthenticatorSpec extends ObjectBehavior
11
{
12
    public function let(UserCheckerInterface $userChecker)
13
    {
14
        $tokenParameterName = 'refresh_token';
15
        $this->beConstructedWith($userChecker, $tokenParameterName);
16
    }
17
18
    public function it_is_initializable()
19
    {
20
        $this->shouldHaveType('Gesdinet\JWTRefreshTokenBundle\Security\Authenticator\RefreshTokenAuthenticator');
21
    }
22
23
    public function it_get_credentials(Request $request)
24
    {
25
        $this->getCredentials($request)->shouldBeArray();
26
    }
27
28
    public function it_fails_on_authentication(Request $request, AuthenticationException $exception)
29
    {
30
        $this->onAuthenticationFailure($request, $exception)->shouldHaveType('Symfony\Component\HttpFoundation\Response');
31
    }
32
}
33