UpDownTest::testCheckApiKey()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 1
dl 0
loc 4
c 0
b 0
f 0
ccs 2
cts 2
cp 1
rs 10
cc 1
nc 1
nop 0
crap 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