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

ResponseTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 28
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A testAccessors() 0 22 1
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