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

QueryAuthStrategyTest::testGetToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 7

Duplication

Lines 13
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 13
loc 13
rs 9.4285
cc 1
eloc 7
nc 1
nop 0
1
<?php
2
3
namespace Eljam\GuzzleJwt\Tests\Strategy\Auth;
4
5
use Eljam\GuzzleJwt\Strategy\Auth\QueryAuthStrategy;
6
7
/**
8
 * @author Guillaume Cavavana <[email protected]>
9
 */
10 View Code Duplication
class QueryAuthStrategyTest extends \PHPUnit_Framework_TestCase
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
11
{
12
    /**
13
     * testGetToken.
14
     */
15
    public function testGetToken()
16
    {
17
        $authStrategy = new QueryAuthStrategy(
18
            [
19
                'username' => 'admin',
20
                'password' => 'admin',
21
                'query_fields' => ['username', 'password'],
22
            ]
23
        );
24
25
        $this->assertTrue(array_key_exists('username', $authStrategy->getGuzzleRequestOptions()['query']));
26
        $this->assertTrue(array_key_exists('password', $authStrategy->getGuzzleRequestOptions()['query']));
27
    }
28
}
29