| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function testGetAndInitNewsClient() |
||
| 14 | { |
||
| 15 | $input = $this->getMockBuilder(InputInterface::class) |
||
| 16 | ->disableOriginalConstructor() |
||
| 17 | ->setMethods(['getOption']) |
||
| 18 | ->getMockForAbstractClass(); |
||
| 19 | |||
| 20 | $input->expects($this->any()) |
||
| 21 | ->method('getOption') |
||
| 22 | ->withConsecutive(['key'], ['secret'], ['publicationId']) |
||
| 23 | ->willReturnOnConsecutiveCalls('key', 'secret', 'sa'); |
||
| 24 | |||
| 25 | $this->assertEmpty($this->newsClient); |
||
| 26 | |||
| 27 | $this->getNewsClient($input); |
||
| 28 | |||
| 29 | $this->assertInstanceOf(Client::class, $this->newsClient); |
||
| 30 | } |
||
| 31 | |||
| 41 |