Fixed fluent interface
This commit is contained in:
parent
04ccdc14fe
commit
138f4a9849
@ -165,7 +165,7 @@ class Table
|
|||||||
if ($row instanceof TableSeparator) {
|
if ($row instanceof TableSeparator) {
|
||||||
$this->rows[] = $row;
|
$this->rows[] = $row;
|
||||||
|
|
||||||
return;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_array($row)) {
|
if (!is_array($row)) {
|
||||||
|
@ -179,10 +179,10 @@ TABLE
|
|||||||
array(
|
array(
|
||||||
array('ISBN', 'Title', 'Author'),
|
array('ISBN', 'Title', 'Author'),
|
||||||
array(
|
array(
|
||||||
array("99921-58-10-7", "Divine\nComedy", "Dante Alighieri"),
|
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("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('960-425-059-0', 'The Lord of the Rings', "J. R. R.\nTolkien"),
|
||||||
),
|
),
|
||||||
'default',
|
'default',
|
||||||
<<<TABLE
|
<<<TABLE
|
||||||
@ -341,6 +341,8 @@ TABLE;
|
|||||||
TABLE;
|
TABLE;
|
||||||
|
|
||||||
$this->assertEquals($expected, $this->getOutputContent($output));
|
$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()
|
protected function getOutputStream()
|
||||||
|
Reference in New Issue
Block a user