Completed
Push — master ( 2ad467...7fcbe3 )
by Guillaume
05:11
created

HttpBasicAuthStrategyTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 2
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetToken() 0 12 1
1
<?php
2
3
namespace Eljam\GuzzleJwt\Tests\Strategy\Auth;
4
5
use Eljam\GuzzleJwt\Strategy\Auth\HttpBasicAuthStrategy;
6
7
/**
8
 * @author Guillaume Cavavana <[email protected]>
9
 */
10
class HttpBasicAuthStrategyTest extends \PHPUnit_Framework_TestCase
11
{
12
    /**
13
     * testGetToken.
14
     */
15
    public function testGetToken()
16
    {
17
        $authStrategy = new HttpBasicAuthStrategy(
18
            [
19
                'username' => 'username',
20
                'password' => 'password',
21
            ]
22
        );
23
24
        $this->assertEquals('username', $authStrategy->getGuzzleRequestOptions()['auth'][0]);
25
        $this->assertEquals('password', $authStrategy->getGuzzleRequestOptions()['auth'][1]);
26
    }
27
}
28