function testParsesInsideAQuoteBlock() { $text = new T_Text_Quote('some citation', T_Text_List::ORDERED . " Item #1"); $expect = new T_Text_Quote('some citation', null); $expect->addChild($list = new T_Text_List(T_Text_List::ORDERED)); $list->addChild(new T_Text_ListItem('Item #1')); $text->accept(new T_Text_ListLexer()); $this->assertEquals($expect, $text); }
function testParsesAQuote() { $element = new T_Text_Quote('cite', '----'); $element->accept(new T_Text_DividerLexer()); $expected = new T_Text_Quote('cite', null); $expected->addChild(new T_Text_Divider()); $this->assertEquals($expected, $element); }
function testParsesInsideAQuoteBlock() { $text = new T_Text_Quote('some citation', '| 1 | 2 |'); $expect = new T_Text_Quote('some citation', null); $expect->addChild($table = new T_Text_Table()); $table->addChild($row = new T_Text_TableRow()); $row->addChild(new T_Text_TableCell('1'))->addChild(new T_Text_TableCell('2')); $text->accept(new T_Text_TableLexer()); $this->assertEquals($expect, $text); }