DeleteContactPersonTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace SergeyNezbritskiy\NovaPoshta\Tests\Integration\Models\ContactPerson;
6
7
use Exception;
8
use PHPUnit\Framework\TestCase;
9
use SergeyNezbritskiy\NovaPoshta\Models\ContactPerson;
10
use SergeyNezbritskiy\NovaPoshta\NovaPoshtaApiException;
11
use SergeyNezbritskiy\NovaPoshta\Tests\UsesConnectionTrait;
12
13
class DeleteContactPersonTest extends TestCase
14
{
15
    use UsesConnectionTrait;
16
17
    private ContactPerson $model;
18
19
    protected function setUp(): void
20
    {
21
        $connection = $this->getConnection();
22
        $this->model = new ContactPerson($connection);
23
    }
24
25
    /**
26
     * @return void
27
     * @throws NovaPoshtaApiException
28
     * @throws Exception
29
     */
30
    public function testDeleteNotExistingContactPerson(): void
31
    {
32
        $this->model->delete('not-existing-contact-person-ref');
33
        $this->assertTrue(true, 'No exception has been thrown, we are good');
34
    }
35
}
36