Conditions | 1 |
Paths | 1 |
Total Lines | 24 |
Code Lines | 16 |
Lines | 24 |
Ratio | 100 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
16 | View Code Duplication | public function testCommand() |
|
17 | { |
||
18 | $container = []; |
||
19 | $response = $this->getMockHttpResponse('GetClassifierSuccess.txt'); |
||
20 | $httpClient = $this->getMockHttpClientWithHistoryAndResponses($container, [$response]); |
||
21 | |||
22 | $arguments = [ |
||
23 | 'username' => 'test', |
||
24 | 'password' => 'test', |
||
25 | 'classifier_id' => 'Magenta', |
||
26 | '--version-date' => '2016-01-01', |
||
27 | ]; |
||
28 | $input = new ArrayInput($arguments); |
||
29 | $output = new BufferedOutput(); |
||
30 | |||
31 | $command = new GetClassifierCommand(null, new Client($httpClient)); |
||
32 | $command->run($input, $output); |
||
33 | |||
34 | $this->assertEquals('classifier:get', $command->getName()); |
||
35 | |||
36 | $correctOutput = file_get_contents('Tests/Mock/Commands/ClassifierSuccess.txt'); |
||
37 | |||
38 | $this->assertEquals($correctOutput, $output->fetch()); |
||
39 | } |
||
40 | } |
||
41 |