Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
18 | public function testSuccess() |
||
19 | { |
||
20 | /** @var RequestInterface $httpRequest */ |
||
21 | $httpRequest = $this->getMockForAbstractClass(RequestInterface::class); |
||
22 | $httpResponse = $this->getMockHttpResponse('GetClassifierSuccess.txt'); |
||
23 | |||
24 | $response = new ClassifierResponse($httpRequest, $httpResponse->getBody()); |
||
25 | |||
26 | /** @var Classifier $classifier */ |
||
27 | $classifier = $response->getClassifier(); |
||
28 | |||
29 | $this->assertEquals('Magenta', $classifier->getName()); |
||
30 | $this->assertEquals('Magenta', $classifier->getId()); |
||
31 | $this->assertNull($classifier->getScore()); |
||
32 | $this->assertEquals('IBM', $classifier->getOwner()); |
||
33 | $this->assertEquals(new DateTime('2016-03-24T14:19:16.000Z'), $classifier->getCreated()); |
||
34 | } |
||
35 | } |
||
36 |