Exemplo n.º 1
0
 function testRegisterShortcodeUsingClasses()
 {
     $shortcode = new Shortcode();
     $shortcode->register('div', 'HTMLShortcode@div');
     $shortcode->register('img', 'HTMLShortcode@img');
     $exceptedDiv = '<div>Hello</div>';
     $exceptedImg = '<img src="#">';
     $this->assertEquals($exceptedDiv, $shortcode->compile('[div]Hello[/div]'));
     $this->assertEquals($exceptedImg, $shortcode->compile('[img src="#"]'));
 }
Exemplo n.º 2
0
 /**
  * Compile the gived content.
  *
  * @param string $content
  * @return void 
  * @static 
  */
 public static function compile($content)
 {
     \Pingpong\Shortcode\Shortcode::compile($content);
 }