bbcode_init() публичный Метод

Init bbcode data for later parsing
public bbcode_init ( $allow_custom_bbcode = true )
Пример #1
0
 /**
  * @dataProvider url_bbcode_test_data
  */
 public function test_url($description, $message, $expected)
 {
     global $user;
     $user = new phpbb_mock_user();
     $bbcode = new bbcode_firstpass();
     $bbcode->message = $message;
     $bbcode->bbcode_init(false);
     $bbcode->parse_bbcode();
     $this->assertEquals($expected, $bbcode->message);
 }
Пример #2
0
 /**
  * @dataProvider bbcode_firstpass_data
  */
 public function test_bbcode_firstpass($description, $message, $expected, $incomplete = false)
 {
     if ($incomplete) {
         $this->markTestIncomplete($incomplete);
     }
     global $user, $request;
     $user = new phpbb_mock_user();
     $request = new phpbb_mock_request();
     $bbcode = new bbcode_firstpass();
     $bbcode->message = $message;
     $bbcode->bbcode_init(false);
     $bbcode->parse_bbcode();
     $this->assertEquals($expected, $bbcode->message);
 }