示例#1
0
 /**
  * Test Parser_Markdown::parse()
  *
  * @test
  */
 public function test_parse()
 {
     $text = "Hello world\n\n* Thank you";
     $output = Parser::forge('markdown')->parse($text);
     $expected = "<p>Hello world</p>\n\n<ul>\n<li>Thank you</li>\n</ul>\n";
     $this->assertEquals($expected, $output);
 }
示例#2
0
 /**
  * Test Parser_Textile::parse();
  *
  * @test
  */
 public function test_parse()
 {
     $text = '*hellow*';
     $output = Parser::forge('textile')->parse($text);
     $expected = "\t<p><strong>hellow</strong></p>";
     $this->assertEquals($expected, $output);
 }
示例#3
0
 /**
  * Test Parser_Bbcode::parse();
  *
  * @test
  */
 public function test_parse()
 {
     $text = "[b]strong[/b][i]italic[/i]";
     $output = Parser::forge('Bbcode')->parse($text);
     $expected = "<b>strong</b><i>italic</i>";
     $this->assertEquals($expected, $output);
 }