From: Raphaƫl Gertz Date: Sun, 10 Feb 2019 04:54:54 +0000 (+0100) Subject: Remove old useless test X-Git-Url: https://git.rapsys.eu/bbcode/commitdiff_plain/8c57c842bee195859686763a89f55ef252052e64 Remove old useless test --- diff --git a/test.php b/test.php deleted file mode 100644 index a6aa3a6..0000000 --- a/test.php +++ /dev/null @@ -1,174 +0,0 @@ -"; - -if(!extension_loaded('bbcode')) { - dl('bbcode.' . PHP_SHLIB_SUFFIX); -} -$module = 'bbcode'; -$functions = get_extension_funcs($module); -/*echo "Functions available in the test extension:$br\n"; -foreach($functions as $func) { - echo $func."$br\n"; -}*/ -echo "$br\n"; -$function = 'confirm_' . $module . '_compiled'; -if (extension_loaded($module)) { - $obj = new $module( - [ - '' => [ - '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 - ); - $obj2 = new $module( - [ - '' => [ - '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 - ); - $obj3 = new $module( - [ - '' => [ - '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 - ); - $obj3 = null; - unset($obj2); - var_dump($obj2 = clone $obj); - var_dump($obj3 = clone $obj); - var_dump($obj4 = clone $obj); - var_dump($obj5 = clone $obj); - var_dump($obj6 = clone $obj); - var_dump($obj2 = clone $obj); - //var_dump(new $module(BBCode::TYPE_ARG, 'tutu')); - exit; - //$str = $function($module); -} else { - $str = "Module $module is not compiled into PHP"; -} -echo "$str\n"; - - /* - array( - 'b' => array( - 'type'=>BBCODE_TYPE_NOARG, - 'open_tag'=>'', - 'close_tag'=>'', - 'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY - ), - 'u' => array( - 'type'=>BBCODE_TYPE_NOARG, - 'open_tag'=>'', - 'close_tag'=>'', - 'flags'=>BBCODE_FLAGS_SMILEYS_OFF | BBCODE_FLAGS_REMOVE_IF_EMPTY | BBCODE_FLAGS_SMILEYS_OFF - ), - 'i' => array( - 'type'=>BBCODE_TYPE_NOARG, - 'open_tag'=>'', - 'close_tag'=>'', - 'flags'=>BBCODE_FLAGS_REMOVE_IF_EMPTY - ) - ), - */ -