Passed
Push — issue#767 ( dafcb3...15eee1 )
by Guilherme
05:07
created

AccessTokenTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAccessToken() 0 11 1
1
<?php
2
/**
3
 * This file is part of the login-cidadao project or it's bundles.
4
 *
5
 * (c) Guilherme Donato <guilhermednt on github>
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 LoginCidadao\OAuthBundle\Tests\Entity;
12
13
use LoginCidadao\OAuthBundle\Entity\AccessToken;
14
15
class AccessTokenTest extends \PHPUnit_Framework_TestCase
16
{
17
    public function testAccessToken()
18
    {
19
        $idToken = 'jwt.id.token';
20
        $accessToken = new AccessToken();
21
        $accessToken->setExpired();
22
        $accessToken->setIdToken($idToken);
23
        $accessToken->setCreatedAtValue();
24
25
        $this->assertSame($idToken, $accessToken->getIdToken());
26
        $this->assertInstanceOf('\DateTime', $accessToken->getCreatedAt());
27
        $this->assertInternalType('int', $accessToken->getExpiresAt());
28
    }
29
}
30