Test Failed
Pull Request — master (#46)
by David
02:47
created

AbstractTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 10 1
1
<?php
2
namespace FlexyProject\GitHub\Tests;
3
4
use FlexyProject\GitHub\Client;
5
use PHPUnit\Framework\TestCase;
6
7
/**
8
 * Class AbstractTest
9
 *
10
 * @package FlexyProject\GitHub\Tests
11
 */
12
abstract class AbstractTest extends TestCase
13
{
14
15
    /** Authentication constants */
16
    const USERNAME = 'githubapi-octocat';
17
    const PASSWORD = 'S=p}g2E($L#T(K3x';
18
19
    /** @var Client */
20
    protected $client;
21
22
    /**
23
     * AbstractTest constructor.
24
     *
25
     * @param null   $name
26
     * @param array  $data
27
     * @param string $dataName
28
     */
29
    public function __construct($name = null, array $data = [], $dataName = '')
30
    {
31
        // Create a client object
32
        $this->client = new Client();
33
34
        // Set auth credentials
35
        $this->client->setHttpAuth(self::USERNAME, self::PASSWORD);
36
37
        parent::__construct($name, $data, $dataName);
38
    }
39
}