/** * @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); }
/** * @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); }