X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=tests%2Fskip.inc;h=d8770fb1fda6f405e690ddd3ab22f489a6352c06;hp=98b15e3242235a8b8092aec39062df02fa9c09ba;hb=refs%2Fheads%2Fv1.7.x;hpb=4a1c5914eccd82e0936f35f0804a9e35ed632f83 diff --git a/tests/skip.inc b/tests/skip.inc index 98b15e3..d8770fb 100644 --- a/tests/skip.inc +++ b/tests/skip.inc @@ -1,9 +1,15 @@ (int) PHP_VERSION, "need PHP v$ver"); } +function checkmin($ver) { skipif(version_compare(PHP_VERSION, $ver) < 0, sprintf("need PHP >= v%s",$ver)); } +function checkmax($ver) { skipif(version_compare(PHP_VERSION, $ver) > 0, sprintf("need PHP <= v%s",$ver)); } function checkurl($url) { skipif(!@fsockopen($url, 80), "$url not responsive"); } +function checkcls($cls) { skipif(!class_exists($cls), "need class $cls"); } +function checkver($ver) { checkmin($ver); } checkext('http'); ?>