construct_WithToken_TokenInHeaders()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 6
rs 10
cc 1
nc 1
nop 0
1
<?php
2
/*
3
 */
4
5
namespace Dolibarr\Client\Tests\Security\Authentication;
6
7
use Dolibarr\Client\Security\Authentication\TokenAuthentication;
8
9
/**
10
 * @author Laurent De Coninck <[email protected]>
11
 */
12
class TokenAuthenticationTest extends \PHPUnit_Framework_TestCase
13
{
14
15
    /**
16
     * @test
17
     */
18
    public function construct_WithToken_TokenInHeaders()
19
    {
20
        $authentication = new TokenAuthentication('token');
21
        $headers = $authentication->getHeaders();
22
23
        $this->assertEquals('token', $headers['Dolapikey']->getHeaderValue());
24
    }
25
}
26