SendPutRequestExceptionUnitTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testSendPutRequestException() 0 11 1
1
<?php
2
namespace Mezon\CustomClient\Tests\SendRequestException;
3
4
use Exception;
5
use Mezon\CustomClient\Tests\TestClient;
6
7
/**
8
 *
9
 * @psalm-suppress PropertyNotSetInConstructor
10
 */
11
class SendPutRequestExceptionUnitTest extends SendRequestException
12
{
13
14
    /**
15
     * Testing result dispatcher
16
     *
17
     * @param int $httpCode
18
     *            code of the response
19
     * @dataProvider resultDispatchingDataProvider
20
     */
21
    public function testSendPutRequestException(int $httpCode): void
22
    {
23
        // setup
24
        $client = new TestClient('http://ya.ru');
25
        $client->httpCode = $httpCode;
26
27
        // assertions
28
        $this->expectException(\Exception::class);
29
30
        // test body
31
        $client->sendPutRequest('/end-point/');
32
    }
33
}
34