From 8c57c842bee195859686763a89f55ef252052e64 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rapha=C3=ABl=20Gertz?= Date: Sun, 10 Feb 2019 05:54:54 +0100 Subject: [PATCH] Remove old useless test --- test.php | 174 ------------------------------------------------------- 1 file changed, 174 deletions(-) delete mode 100644 test.php 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 - ) - ), - */ - -- 2.41.1