AbstractRequestTest::testGetParameters()   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\Tests\Base;
7
use GuzzleHttp\Client;
8
9
/**
10
 * Class AbstractRequestTest
11
 * @package Bobbyshaw\WatsonVisualRecognition\Tests\Message
12
 */
13
class AbstractRequestTest extends Base
14
{
15
    /**
16
     * @var AbstractRequest
17
     */
18
    private $request;
19
    private $config = ['username' => 'username'];
20
21
    public function setUp()
22
    {
23
        $this->request = $this->getMockForAbstractClass(AbstractRequest::class, [new Client()]);
24
        $this->request->initialize($this->config);
25
    }
26
27
    /**
28
     * @expectedException \RuntimeException
29
     */
30
    public function testGetResponseBeforeSend()
31
    {
32
        $this->request->getResponse();
33
    }
34
35
    public function testGetParameters()
36
    {
37
        $this->assertEquals($this->config, $this->request->getParameters());
38
    }
39
}
40