function testParsesAnEmphText() { $element = new T_Text_Emph('^2'); $element->accept(new T_Text_SuperSubscriptLexer()); $expected = new T_Text_Emph(null); $expected->addChild(new T_Text_Superscript('2')); $this->assertEquals($expected, $element); }
function testNoRecursiveEmphTextParsing() { $strong = new T_Text_Emph('**content**'); $expected = clone $strong; $strong->accept(new T_Text_EmphLexer()); $this->assertEquals($expected, $strong); }
function testParsesEmphasisedText() { $element = new T_Text_Emph('[http://example.com content]'); $element->accept(new T_Text_LinkLexer()); $expected = new T_Text_Emph(); $expected->addChild(new T_Text_ExternalLink('content', 'http://example.com')); $this->assertEquals($expected, $element); }