diff --git a/tests/text_reparser/fixtures/groups.xml b/tests/text_reparser/fixtures/groups.xml new file mode 100644 index 0000000000..d3df0131a3 --- /dev/null +++ b/tests/text_reparser/fixtures/groups.xml @@ -0,0 +1,69 @@ + + + + group_id + group_desc + group_desc_options + group_desc_uid + + 1 + This row should be [b]ignored[/b] + 7 + abcd1234 + + + 2 + [b]Not bold[/b] :) http://example.org + 0 + abcd1234 + + + 3 + [b:abcd1234]Bold[/b:abcd1234] :) http://example.org + 1 + abcd1234 + + + 4 + :) http://example.org]]> + 2 + abcd1234 + + + 5 + http://example.org]]> + 4 + abcd1234 + + + 6 + + 7 + abcd1234 + + + 7 + + 7 + abcd1234 + + + 8 + + 7 + abcd1234 + + + 9 + + 7 + abcd1234 + + + 1000 + This row should be [b]ignored[/b] + 7 + abcd1234 + +
+
diff --git a/tests/text_reparser/group_description_test.php b/tests/text_reparser/group_description_test.php new file mode 100644 index 0000000000..51035903e1 --- /dev/null +++ b/tests/text_reparser/group_description_test.php @@ -0,0 +1,26 @@ + +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ +include_once __DIR__ . '/test_row_based_plugin.php'; + +class phpbb_textreparser_group_description_test extends phpbb_textreparser_test_row_based_plugin +{ + public function getDataSet() + { + return $this->createXMLDataSet(__DIR__ . '/fixtures/groups.xml'); + } + + protected function get_reparser() + { + return new \phpbb\textreparser\plugins\group_description($this->db); + } +}