public printResult ( string $filename, array $count ) | ||
$filename | string | |
$count | array |
public function printResult($filename, array $count)
{
file_put_contents($filename, $this->getKeysLine($count) . $this->getValuesLine($count));
}
public function testExactlyThreeRowsArePrinted() { ob_start(); $this->history->printResult('php://output', $this->sample_data); $output = ob_get_clean(); $rows = explode("\n", trim($output)); $this->assertEquals(3, count($rows), "Printed result contained more or less than expected 2 rows"); }