Passed
Pull Request — master (#34)
by Marc
05:44
created

ResponseTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
dl 0
loc 27
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAccessors() 0 21 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace TBolier\RethinkQL\UnitTest\Query;
5
6
use TBolier\RethinkQL\Response\Response;
7
use TBolier\RethinkQL\UnitTest\BaseUnitTestCase;
8
9
class ResponseTest extends BaseUnitTestCase
10
{
11
    /**
12
     * @return void
13
     * @throws \Exception
14
     */
15
    public function testAccessors(): void
16
    {
17
        $type = 1;
18
        $data = ['foo' => 'bar'];
19
        $backtrace = [0 => [1 => []]];
20
        $profile = [2 => [3 => []]];
21
        $note = [4 => [5 => []]];
22
23
        $response = new Response(
24
            $type,
25
            $data,
26
            $backtrace,
27
            $profile,
28
            $note
29
        );
30
31
        $this->assertEquals($type, $response->getType());
32
        $this->assertEquals($data, $response->getData());
33
        $this->assertEquals($backtrace, $response->getBacktrace());
34
        $this->assertEquals($profile, $response->getProfile());
35
        $this->assertEquals($note, $response->getNote());
36
    }
37
}
38