$this->assertEquals($expected, $this->getOutputContent($output));
}
+ /**
+ * @expectedException \Symfony\Component\Console\Exception\InvalidArgumentException
+ * @expectedExceptionMessage A cell must be a TableCell, a scalar or an object implementing __toString, array given.
+ */
+ public function testThrowsWhenTheCellInAnArray()
+ {
+ $table = new Table($output = $this->getOutputStream());
+ $table
+ ->setHeaders(array('ISBN', 'Title', 'Author', 'Price'))
+ ->setRows(array(
+ array('99921-58-10-7', array(), 'Dante Alighieri', '9.95'),
+ ));
+
+ $table->render();
+ }
+
public function testColumnWith()
{
$table = new Table($output = $this->getOutputStream());