Completed
Push — master ( 8247ab...4ae4bd )
by Andrii
32:57
created

CurlRepoTest::tearDown()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * GitHub API implementation for yii2-hiart
4
 *
5
 * @link      https://github.com/hiqdev/yii2-hiart-github
6
 * @package   yii2-hiart-github
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\hiart\github\tests\functional;
12
13
use hiqdev\hiart\curl\Request;
14
use hiqdev\hiart\github\models\Repo;
15
use Yii;
16
17
class CurlRepoTest extends RepoTest
18
{
19
    protected static $github;
20
21
    public function setUp()
22
    {
23
        if (static::$github === null) {
24
            static::$github = Yii::$app->getComponents()['github'];
25
        }
26
27
        Yii::$app->set('github', array_merge(static::$github, [
28
            'requestClass' => Request::class,
29
        ]));
30
    }
31
32
    public function tearDown()
33
    {
34
        Yii::$app->set('github', static::$github);
35
    }
36
}
37