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

HttpBasicAuthStrategyTest::testGetToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 12
rs 9.4285
cc 1
eloc 6
nc 1
nop 0
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