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