Ejemplo n.º 1
0
 /**
  *
  *
  */
 public function testShortcodeGeneration()
 {
     $info = array('shortcode' => '[myshortcode x="1"]');
     $result = Phpsnippets\Base::get_shortcode($info, 'myshortcode');
     $this->assertTrue($result == $info['shortcode'], 'The shortcode was not generated properly.');
     $info = array('content' => '');
     $result = Phpsnippets\Base::get_shortcode($info, 'myshortcode');
     $this->assertTrue($result == '[myshortcode][/myshortcode]', 'The shortcode was not generated properly.');
     $info = array('params' => array('x' => '', 'y' => '456'));
     $result = Phpsnippets\Base::get_shortcode($info, 'myshortcode');
     $this->assertTrue($result == '[myshortcode x="" y="456"]', 'The shortcode was not generated properly.');
 }