summaryrefslogtreecommitdiff
path: root/tests/output/ob_get_length_basic_001.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/output/ob_get_length_basic_001.phpt')
-rw-r--r--tests/output/ob_get_length_basic_001.phpt37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/output/ob_get_length_basic_001.phpt b/tests/output/ob_get_length_basic_001.phpt
new file mode 100644
index 0000000..98469c2
--- /dev/null
+++ b/tests/output/ob_get_length_basic_001.phpt
@@ -0,0 +1,37 @@
+--TEST--
+Test return type and value, as well as basic behaviour, of ob_get_length()
+--FILE--
+<?php
+/*
+ * proto int ob_get_length(void)
+ * Function is implemented in main/output.c
+*/
+
+echo "No output buffers\n";
+var_dump(ob_get_length());
+
+ob_start();
+var_dump(ob_get_length());
+echo "hello\n";
+var_dump(ob_get_length());
+ob_flush();
+$value = ob_get_length();
+echo "hello\n";
+ob_clean();
+var_dump(ob_get_length());
+var_dump($value);
+ob_end_flush();
+
+echo "No output buffers\n";
+var_dump(ob_get_length());
+?>
+--EXPECTF--
+No output buffers
+bool(false)
+int(0)
+hello
+int(13)
+int(0)
+int(0)
+No output buffers
+bool(false) \ No newline at end of file