@@ 21-28 (lines=8) @@ | ||
18 | } |
|
19 | ||
20 | ||
21 | public function testGetError() |
|
22 | { |
|
23 | $data = json_decode($this->response->getBody(), true); |
|
24 | ||
25 | $utteranceAnalysis = UtteranceAnalysis::create($data[UtteranceAnalyses::KEY_TONE][0]); |
|
26 | ||
27 | $this->assertNull($utteranceAnalysis->getError()); |
|
28 | } |
|
29 | ||
30 | public function testGetId() |
|
31 | { |
|
@@ 30-37 (lines=8) @@ | ||
27 | $this->assertNull($utteranceAnalysis->getError()); |
|
28 | } |
|
29 | ||
30 | public function testGetId() |
|
31 | { |
|
32 | $data = json_decode($this->response->getBody(), true); |
|
33 | ||
34 | $utteranceAnalysis = UtteranceAnalysis::create($data[UtteranceAnalyses::KEY_TONE][0]); |
|
35 | ||
36 | $this->assertSame(0, $utteranceAnalysis->getId()); |
|
37 | } |
|
38 | ||
39 | public function testGetText() |
|
40 | { |
|
@@ 39-46 (lines=8) @@ | ||
36 | $this->assertSame(0, $utteranceAnalysis->getId()); |
|
37 | } |
|
38 | ||
39 | public function testGetText() |
|
40 | { |
|
41 | $data = json_decode($this->response->getBody(), true); |
|
42 | ||
43 | $utteranceAnalysis = UtteranceAnalysis::create($data[UtteranceAnalyses::KEY_TONE][0]); |
|
44 | ||
45 | $this->assertSame('Hello, I\'m having a problem with your product.', $utteranceAnalysis->getText()); |
|
46 | } |
|
47 | ||
48 | public function testCreate() |
|
49 | { |
|
@@ 48-55 (lines=8) @@ | ||
45 | $this->assertSame('Hello, I\'m having a problem with your product.', $utteranceAnalysis->getText()); |
|
46 | } |
|
47 | ||
48 | public function testCreate() |
|
49 | { |
|
50 | $data = json_decode($this->response->getBody(), true); |
|
51 | ||
52 | $utteranceAnalysis = UtteranceAnalysis::create($data[UtteranceAnalyses::KEY_TONE][0]); |
|
53 | ||
54 | $this->assertInstanceOf(UtteranceAnalysis::class, $utteranceAnalysis); |
|
55 | } |
|
56 | ||
57 | public function testGetTones() |
|
58 | { |
|
@@ 57-64 (lines=8) @@ | ||
54 | $this->assertInstanceOf(UtteranceAnalysis::class, $utteranceAnalysis); |
|
55 | } |
|
56 | ||
57 | public function testGetTones() |
|
58 | { |
|
59 | $data = json_decode($this->response->getBody(), true); |
|
60 | ||
61 | $utteranceAnalysis = UtteranceAnalysis::create($data[UtteranceAnalyses::KEY_TONE][0]); |
|
62 | ||
63 | $this->assertInternalType(IsType::TYPE_ARRAY, $utteranceAnalysis->getTones()); |
|
64 | } |
|
65 | } |
|
66 |