TokenAuthenticationTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 4
c 1
b 0
f 1
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A construct_WithToken_TokenInHeaders() 0 6 1
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