HttpClientTestCase   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setBaseUrl() 0 4 1
A getBaseUrl() 0 4 1
1
<?php
2
/**
3
 * This file is part of the httpclient package.
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 *
7
 * @copyright Bee4 2013
8
 * @author    Stephane HULARD <[email protected]>
9
 * @package   Bee4\PHPUnit
10
 */
11
12
namespace Bee4\PHPUnit;
13
14
/**
15
 * Specific HttpClient test case extension.
16
 * Allow to register the base URL for all tests
17
 * @package   Bee4\PHPUnit
18
 */
19
class HttpClientTestCase extends \PHPUnit_Framework_TestCase
20
{
21
    /**
22
     * @var string
23
     */
24
    private static $baseURL;
25
26
    /**
27
     * Set the URL that will be used as root in all tests
28
     * @param string $baseURL The base URL configured
29
     */
30
    public static function setBaseUrl($baseURL)
31
    {
32
        self::$baseURL = $baseURL;
33
    }
34
35
    /**
36
     * Base URL accessor
37
     * @return string
38
     */
39
    public static function getBaseUrl()
40
    {
41
        return self::$baseURL;
42
    }
43
}
44