Completed
Push — master ( 4671d6...c5be3c )
by Andrey
03:04
created

RequestExceptionTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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