Completed
Push — develop ( 5fc40e...dcac96 )
by Adam
13s
created

ClientTest::testToneChat()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 0
1
<?php
2
3
namespace IBM\Watson\ToneAnalyzer\tests;
4
5
use IBM\Watson\Common\Hydrator\HydratorInterface;
6
use IBM\Watson\ToneAnalyzer\Api\Tone;
7
use IBM\Watson\ToneAnalyzer\Api\ToneChat;
8
use PHPUnit\Framework\TestCase;
9
use Http\Client\HttpClient;
10
use IBM\Watson\Common\Hydrator\ArrayHydrator;
11
use IBM\Watson\ToneAnalyzer\Client;
12
use Mockery as m;
13
14
class ClientTest extends TestCase
15
{
16
    private $httpClient;
17
    private $hydrator;
18
    private $requestBuilder;
19
20
    public function setUp()
21
    {
22
        $this->httpClient = m::mock(HttpClient::class);
23
        $this->hydrator = m::mock(HydratorInterface::class);
24
        $this->requestBuilder = m::mock();
25
    }
26
27
    public function testCreate()
28
    {
29
        $client = Client::create('adam', 'password');
30
31
        $this->assertInstanceOf(Client::class, $client);
32
    }
33
34
    public function testTone()
35
    {
36
        $client = Client::create('adam', 'password');
37
38
        $this->assertInstanceOf(Tone::class, $client->tone());
39
    }
40
41
    public function testToneChat()
42
    {
43
        $client = Client::create('adam', 'password');
44
45
        $this->assertInstanceOf(ToneChat::class, $client->toneChat());
46
    }
47
}
48