Completed
Push — develop ( 86f0dd...f71342 )
by Adam
12s
created

AbstractRequestTest::setUp()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
c 0
b 0
f 0
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace IBM\Watson\ToneAnalyzer\Message;
4
5
use GuzzleHttp\Client;
6
use IBM\Watson\Common\Message\ResponseInterface;
7
use Mockery as m;
8
use Symfony\Component\HttpFoundation\Request;
9
10
class AbstractRequestTest extends \PHPUnit_Framework_TestCase
11
{
12
    protected $request;
13
14
    public function setUp()
15
    {
16
        $this->request = m::mock('\IBM\Watson\ToneAnalyzer\Message\AbstractRequest')->makePartial();
17
        $this->request->initialize();
18
    }
19
20
    public function testVersion()
21
    {
22
        $this->assertSame('2016-05-19', $this->request->getVersion());
23
        $this->assertSame($this->request, $this->request->setVersion('2017-01-01'));
24
        $this->assertSame('2017-01-01', $this->request->getVersion());
25
    }
26
27
    public function testText()
28
    {
29
        $this->assertSame($this->request, $this->request->setText('Some test text'));
30
        $this->assertSame('Some test text', $this->request->getText());
31
    }
32
}
33
34
class AbstractRequestTest_MockAbstractRequest extends AbstractRequest
0 ignored issues
show
Coding Style Compatibility introduced by
PSR1 recommends that each class should be in its own file to aid autoloaders.

Having each class in a dedicated file usually plays nice with PSR autoloaders and is therefore a well established practice. If you use other autoloaders, you might not want to follow this rule.

Loading history...
35
{
36
    public function getData()
37
    {
38
    }
39
40
    public function sendData($data)
41
    {
42
    }
43
}
44