*/ class ConsoleTableWriterTest extends \PHPUnit_Framework_TestCase { public function testRightColumnsHeadersNamesAfterItemConverter() { $data = array( array( 'firstname' => 'John', 'lastname' => 'Doe' ), array( 'firstname' => 'Ivan', 'lastname' => 'Sidorov' ) ); $reader = new ArrayReader($data); $output = new BufferedOutput(); $table = $this->getMockBuilder('Symfony\Component\Console\Helper\Table') ->disableOriginalConstructor() ->getMock(); $table->expects($this->at(2)) ->method('addRow'); $workflow = new StepAggregator($reader); $workflow ->addWriter(new ConsoleTableWriter($output, $table)) ->process() ; } }