Completed
Push — master ( c4513b...cc10a3 )
by Harry
03:02
created

FunctionalTestCase   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A createClient() 0 4 2
1
<?php
2
3
/*
4
 * This file is part of Guzzle HTTP JSON-RPC
5
 *
6
 * Copyright (c) 2014 Nature Delivered Ltd. <http://graze.com>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 *
11
 * @see  http://github.com/graze/guzzle-jsonrpc/blob/master/LICENSE
12
 * @link http://github.com/graze/guzzle-jsonrpc
13
 */
14
15
namespace Graze\GuzzleHttp\JsonRpc\Test;
16
17
use Graze\GuzzleHttp\JsonRpc\Client;
18
use PHPUnit_Framework_TestCase as TestCase;
19
20
class FunctionalTestCase extends TestCase
21
{
22
    /**
23
     * @var string
24
     */
25
    protected $defaultUrl = 'http://node:80';
26
27
    /**
28
     * @param  string|null $url
29
     * @param  array       $config
30
     *
31
     * @return Client
32
     */
33
    public function createClient($url = null, array $config = [])
34
    {
35
        return Client::factory($url ?: $this->defaultUrl, $config);
36
    }
37
}
38