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

testItReturnsBaseExceptionProvidedToConstruct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 8
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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
}