public function testThatOutputIsAsExpectedForAFiniteNumberOfFiles() { $status = new Status($this->getSvnNumberMock()); $expectedArray = array("[1m[38;5;253m 1 [1m[38;5;40mA[38;5;253m [0m[38;5;40mfoo/bar.txt [0m"); $expected = trim(implode(PHP_EOL, $expectedArray)); $this->assertSame(str_replace("", "@", $expected), str_replace("", "@", trim($status->getOutput(array(1))))); $this->assertSame($expected, trim($status->getOutput(array(1)))); }
function printStatus(Status $status, $forceOutputAll = false) { if (false === $forceOutputAll && $status->getSvnNumber()->hasRequestedNumbers()) { exit($status->getOutput($status->getSvnNumber()->getRequestedNumbers())); } else { exit($status->getOutput(null)); } }