summaryrefslogtreecommitdiff
path: root/ext/spl/tests/heap_top_variation_001.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/heap_top_variation_001.phpt')
-rw-r--r--ext/spl/tests/heap_top_variation_001.phpt14
1 files changed, 14 insertions, 0 deletions
diff --git a/ext/spl/tests/heap_top_variation_001.phpt b/ext/spl/tests/heap_top_variation_001.phpt
new file mode 100644
index 0000000000..9953cf9ade
--- /dev/null
+++ b/ext/spl/tests/heap_top_variation_001.phpt
@@ -0,0 +1,14 @@
+--TEST--
+SPL: SplHeap top, illegal number of args
+--CREDITS--
+Mark Schaschke (mark@fractalturtle.com)
+TestFest London May 2009
+--FILE--
+<?php
+$h = new SplMinHeap();
+$h->insert(5);
+// top doesn't take any args, lets see what happens if we give it one
+$h->top('bogus');
+?>
+--EXPECTF--
+Warning: SplHeap::top() expects exactly 0 parameters, 1 given in %s