--TEST-- Check for bbcode functions --SKIPIF-- --FILE-- [ 'type' => BBCODE::TYPE_ROOT, 'childs' => ['ul','url','img','b','i'] ], 'i' => [ 'type' => BBCODE::TYPE_NOARG //TODO: by default open tag = and close tag = ], 'b' => [ 'type' => BBCODE::TYPE_NOARG ], 'ul' => [ 'type' => BBCODE::TYPE_NOARG, 'childs' => [ 'li' ] ], 'li' => [ 'type' => BBCODE::TYPE_NOARG, 'parent' => 'ul', 'childs' => ['url','img','b','i'] ], 'url' => [ 'type' => BBCODE::TYPE_OPTARG, 'open_tag' => '', 'close_tag' => '', 'default_arg' => '{CONTENT}', 'parent' => [ '', 'li', 'b', 'i' ] ] ], [ ':)' => ':)', ':(' => ':(', ':D' => ':D', ':p' => ':p', ':|' => ':|', ':6:' => ':6:' ], BBCODE::REMOVE_EMPTY ); echo $obj->parse('[ul][li][url=https://rapsys.eu]Rapsys[/url][/li][li][url=https://google.fr]Google[/url][/li][/ul]'); /* you can add regression tests for your extension here the output of your test code has to be equal to the text in the --EXPECT-- section below for the tests to pass, differences between the output and the expected text are interpreted as failure see php7/README.TESTING for further information on writing regression tests */ ?> --EXPECT-- [ul][li][url=https://rapsys.eu]Rapsys[/url][/li][li][url=https://google.fr]Google[/url][/li][/ul]