TestBase::getClient()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 2
Metric Value
c 3
b 0
f 2
dl 0
loc 7
rs 9.4286
cc 1
eloc 5
nc 1
nop 2
1
<?php
2
3
namespace CommerceGuys\Guzzle\Oauth2\Tests;
4
5
use GuzzleHttp\Client;
6
7
abstract class TestBase extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * @param array $options
11
     * @param array $serverOptions
12
     *
13
     * @return \GuzzleHttp\ClientInterface
14
     */
15
    protected function getClient(array $options = [], array $serverOptions = [])
16
    {
17
        $server = new MockOAuth2Server($serverOptions);
18
        return new Client([
19
                'handler' => $server->getHandler()
20
            ] + $options);
21
    }
22
}
23