@@ 12-20 (lines=9) @@ | ||
9 | ||
10 | class UtteranceAnalysesTest extends AbstractTestCase |
|
11 | { |
|
12 | public function testCreate() |
|
13 | { |
|
14 | $response = $this->getMockResponse('ToneChatResponse.json'); |
|
15 | $data = json_decode($response->getBody(), true); |
|
16 | ||
17 | $utteranceAnalyses = UtteranceAnalyses::create($data); |
|
18 | ||
19 | $this->assertInstanceOf(UtteranceAnalyses::class, $utteranceAnalyses); |
|
20 | } |
|
21 | ||
22 | public function testGetTones() |
|
23 | { |
|
@@ 22-31 (lines=10) @@ | ||
19 | $this->assertInstanceOf(UtteranceAnalyses::class, $utteranceAnalyses); |
|
20 | } |
|
21 | ||
22 | public function testGetTones() |
|
23 | { |
|
24 | $response = $this->getMockResponse('ToneChatResponse.json'); |
|
25 | $data = json_decode($response->getBody(), true); |
|
26 | ||
27 | $utteranceAnalyses = UtteranceAnalyses::create($data); |
|
28 | ||
29 | $this->assertInstanceOf(UtteranceAnalyses::class, $utteranceAnalyses); |
|
30 | $this->assertInternalType(IsType::TYPE_ARRAY, $utteranceAnalyses->getTones()); |
|
31 | } |
|
32 | ||
33 | public function testGetWarning() |
|
34 | { |
|
@@ 33-41 (lines=9) @@ | ||
30 | $this->assertInternalType(IsType::TYPE_ARRAY, $utteranceAnalyses->getTones()); |
|
31 | } |
|
32 | ||
33 | public function testGetWarning() |
|
34 | { |
|
35 | $response = $this->getMockResponse('ToneChatResponse.json'); |
|
36 | $data = json_decode($response->getBody(), true); |
|
37 | ||
38 | $utteranceAnalyses = UtteranceAnalyses::create($data); |
|
39 | ||
40 | $this->assertSame('Content contains more than 50 utterances.', $utteranceAnalyses->getWarning()); |
|
41 | } |
|
42 | } |
|
43 |