Passed
Push — master ( 7c85b2...443a3c )
by Andrey
03:17
created

RequestExceptionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 6
dl 0
loc 11
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testItReturnsBaseExceptionProvidedToConstruct() 0 8 1
1
<?php
2
namespace FtwSoft\NotificationChannels\Intercom\Tests;
3
4
5
use FtwSoft\NotificationChannels\Intercom\Exceptions\RequestException;
6
use GuzzleHttp\Psr7\Request;
7
use PHPUnit\Framework\TestCase;
8
use GuzzleHttp\Exception\RequestException as BaseRequestException;
9
10
class RequestExceptionTest extends TestCase
11
{
12
13
    public function testItReturnsBaseExceptionProvidedToConstruct(): void
14
    {
15
        $baseException = new BaseRequestException(
16
            'It is an exception',
17
            new Request('get', 'http://foo.bar')
18
        );
19
        $exception = new RequestException($baseException);
20
        $this->assertEquals($exception->getBaseException(), $baseException);
21
    }
22
23
}