UpDownTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 5
dl 0
loc 37
c 0
b 0
f 0
ccs 11
cts 11
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A testInstanceOfCheck() 0 4 1
A testCheckApiKey() 0 4 1
A testUpDownClient() 0 4 1
A testInstanceOfCheckFromInstanceMethod() 0 4 1
1
<?php
2
/**
3
 * Copyright (c) 2019 - present
4
 * updown - UpDownTest.php
5
 * author: Roberto Belotti - [email protected]
6
 * web : robertobelotti.com, github.com/biscolab
7
 * Initial version created on: 15/2/2019
8
 * MIT license: https://github.com/biscolab/updown-php/blob/master/LICENSE
9
 */
10
11
namespace Tests\Unit;
12
13
use Biscolab\UpDown\Http\UpDownClient;
14
use Biscolab\UpDown\Tests\TestCase;
15
use Biscolab\UpDown\UpDown;
16
17
class UpDownTest extends TestCase
18
{
19
20
    /**
21
     * @test
22
     */
23 1
    public function testInstanceOfCheck()
24
    {
25
26 1
        $this->assertInstanceOf(UpDown::class, $this->updown);
27 1
    }
28
29
    /**
30
     * @test
31
     */
32 1
    public function testInstanceOfCheckFromInstanceMethod()
33
    {
34
35 1
        $this->assertInstanceOf(UpDown::class, UpDown::instance());
36 1
    }
37
38
    /**
39
     * @test
40
     */
41 1
    public function testCheckApiKey()
42
    {
43
44 1
        $this->assertEquals($_ENV['API_KEY'], $this->updown->getKey());
45 1
    }
46
47
    /**
48
     * @test
49
     */
50 1
    public function testUpDownClient()
51
    {
52
53 1
        $this->assertInstanceOf(UpDownClient::class, $this->updown->getClient());
54 1
    }
55
56
}
57