public function getOutput()
{
$output = [];
if ($this->isEmpty()) {
$output[] = '<fg=green>No changelogs summary</fg=green>';
} else {
$output[] = '<fg=green>Changelogs summary:</fg=green>';
foreach ($this->operations as $operation) {
$this->createOperationOutput($output, $operation);
}
$output[] = '';
}
return implode("\n", $output);
}
public function test_it_outputs_nothing_without_operation() { $expectedOutput = <<<TEXT <fg=green>No changelogs summary</fg=green> TEXT; $this->assertSame($expectedOutput, $this->SUT->getOutput()); }