ClientTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
eloc 5
c 3
b 0
f 1
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 3 1
A testAddressModelProperty() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SergeyNezbritskiy\NovaPoshta\Tests\Unit;
6
7
use Exception;
8
use PHPUnit\Framework\TestCase;
9
use SergeyNezbritskiy\NovaPoshta\Client;
10
use SergeyNezbritskiy\NovaPoshta\Models\Address;
11
12
/**
13
 * Class ClientTest
14
 * Unit test for \SergeyNezbritskiy\NovaPoshta\Client
15
 * @see Client
16
 */
17
class ClientTest extends TestCase
18
{
19
    private Client $object;
20
21
    protected function setUp(): void
22
    {
23
        $this->object = new Client('some-key');
24
    }
25
26
    /**
27
     * @throws Exception
28
     */
29
    public function testAddressModelProperty(): void
30
    {
31
        $addressModel = $this->object->address;
32
        $this->assertInstanceOf(Address::class, $addressModel);
33
    }
34
}
35