AbstractResponseTest::testGetRequest()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Bobbyshaw\WatsonVisualRecognition\Tests\Message;
4
5
use Bobbyshaw\WatsonVisualRecognition\Message\AbstractRequest;
6
use Bobbyshaw\WatsonVisualRecognition\Message\AbstractResponse;
7
use Bobbyshaw\WatsonVisualRecognition\Tests\Base;
8
use GuzzleHttp\Client;
9
10
/**
11
 * Class AbstractResponseTest
12
 * @package Bobbyshaw\WatsonVisualRecognition\Tests\Message
13
 */
14
class AbstractResponseTest extends Base
15
{
16
    /**
17
     * @var AbstractRequest
18
     */
19
    protected $request;
20
21
    /**
22
     * @var AbstractResponse
23
     */
24
    protected $response;
25
26
    protected $data = 'test';
27
28
    public function setUp()
29
    {
30
        $this->request = $this->getMockForAbstractClass(AbstractRequest::class, [new Client()]);
31
        $this->response = $this->getMockForAbstractClass(AbstractResponse::class, [$this->request, $this->data]);
32
    }
33
    
34
    public function testGetRequest()
35
    {
36
        $this->assertEquals($this->request, $this->response->getRequest());
37
    }
38
39
    public function testGetData()
40
    {
41
        $this->assertEquals($this->data, $this->response->getData());
42
    }
43
}
44