Fixed fluent interface

This commit is contained in:
Joshua Thijssen 2015-06-14 19:52:00 +02:00 committed by Tobias Schultze
parent 04ccdc14fe
commit 138f4a9849
2 changed files with 7 additions and 5 deletions

View File

@ -165,7 +165,7 @@ class Table
if ($row instanceof TableSeparator) {
$this->rows[] = $row;
return;
return $this;
}
if (!is_array($row)) {

View File

@ -179,10 +179,10 @@ TABLE
array(
array('ISBN', 'Title', 'Author'),
array(
array("99921-58-10-7", "Divine\nComedy", "Dante Alighieri"),
array("9971-5-0210-2", "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."),
array("9971-5-0210-2", "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."),
array("960-425-059-0", "The Lord of the Rings", "J. R. R.\nTolkien"),
array('99921-58-10-7', "Divine\nComedy", 'Dante Alighieri'),
array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."),
array('9971-5-0210-2', "Harry Potter\nand the Chamber of Secrets", "Rowling\nJoanne K."),
array('960-425-059-0', 'The Lord of the Rings', "J. R. R.\nTolkien"),
),
'default',
<<<TABLE
@ -341,6 +341,8 @@ TABLE;
TABLE;
$this->assertEquals($expected, $this->getOutputContent($output));
$this->assertEquals($table, $table->addRow(new TableSeparator()), 'fluent interface on addRow() with a single TableSeparator() works');
}
protected function getOutputStream()