]> Raphaƫl G. Git Repositories - bbcode/blobdiff - tests/001.phpt
Add basic tests
[bbcode] / tests / 001.phpt
index 1abb88f075143ec42abc20188a7016aa6595e372..15d10631da21da832d7f01898eba0aaf40cade4c 100644 (file)
@@ -4,18 +4,18 @@ Check for bbcode presence
 <?php if (!extension_loaded("bbcode")) print "skip"; ?>
 --FILE--
 <?php 
 <?php if (!extension_loaded("bbcode")) print "skip"; ?>
 --FILE--
 <?php 
-echo "bbcode extension is available";
-/*
-       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
-*/
-?>
+if (class_exists('BBCode')) {
+       echo 'bbcode class is available'."\n";
+}
+if ($methods = get_class_methods('BBCode')) {
+       echo 'bbcode class methods are available'."\n";
+}
+foreach($methods as $method) {
+       echo 'bbcode class method '.$method.' is available'."\n";
+}
 --EXPECT--
 --EXPECT--
-bbcode extension is available
+bbcode class is available
+bbcode class methods are available
+bbcode class method __construct is available
+bbcode class method __destruct is available
+bbcode class method parse is available