summaryrefslogtreecommitdiff
path: root/ext/spl/tests/spl_maxheap_compare_basic.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/spl/tests/spl_maxheap_compare_basic.phpt')
-rw-r--r--ext/spl/tests/spl_maxheap_compare_basic.phpt22
1 files changed, 22 insertions, 0 deletions
diff --git a/ext/spl/tests/spl_maxheap_compare_basic.phpt b/ext/spl/tests/spl_maxheap_compare_basic.phpt
new file mode 100644
index 0000000..3705b3f
--- /dev/null
+++ b/ext/spl/tests/spl_maxheap_compare_basic.phpt
@@ -0,0 +1,22 @@
+--TEST--
+SPL: SplMaxHeap, Test method to comare elements
+--CREDITS--
+Chris Scott chris.scott@nstein.com
+#testfest London 2009-05-09
+--FILE--
+<?php
+
+class MyHeap extends SplMaxHeap
+{
+ public function testCompare()
+ {
+ return parent::compare(1);
+ }
+}
+
+$heap = new MyHeap();
+$heap->testCompare();
+
+?>
+--EXPECTF--
+Warning: SplMaxHeap::compare() expects exactly 2 parameters, %s