Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
 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);
 }
Ejemplo n.º 3
0
 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);
 }