Passed
Pull Request — master (#11)
by Michel
02:36
created

ResponseTest::testAccessors()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 17

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 17
nc 1
nop 0
dl 0
loc 22
rs 9.2
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace TBolier\RethinkQL\UnitTest\Query;
5
6
use PHPUnit\Framework\TestCase;
7
use TBolier\RethinkQL\Response\Response;
8
9
class ResponseTest extends TestCase
10
{
11
    /**
12
     * @return void
13
     */
14
    public function testAccessors(): void
15
    {
16
        $type = 1;
17
        $data = ['foo' => 'bar'];
18
        $backtrace = [0 => [1 => []]];
19
        $profile = [2 => [3 => []]];
20
        $note = [4 => [5 => []]];
21
22
        $response = new Response(
23
            $type,
24
            $data,
25
            $backtrace,
26
            $profile,
27
            $note
28
        );
29
30
        $this->assertEquals($type, $response->getType());
31
        $this->assertEquals($data, $response->getData());
32
        $this->assertEquals($backtrace, $response->getBacktrace());
33
        $this->assertEquals($profile, $response->getProfile());
34
        $this->assertEquals($note, $response->getNote());
35
    }
36
}
37