]> granicus.if.org Git - php/commitdiff
Fixed test (backtrace was changed)
authorDmitry Stogov <dmitry@zend.com>
Thu, 25 May 2017 13:02:16 +0000 (16:02 +0300)
committerDmitry Stogov <dmitry@zend.com>
Thu, 25 May 2017 13:02:16 +0000 (16:02 +0300)
ext/spl/tests/spl_heap_count_basic.phpt

index a14133e873e09fe8f86d0e7ba78f29339185f0b0..3bdd6580dcd91c8439bc35f07ece5b950af3e4eb 100644 (file)
@@ -23,13 +23,12 @@ class MyHeap extends SplHeap
 
 $heap = new MyHeap();
 $heap->insert(1);
-count($heap);// refers to MyHeap->count() method
+try {
+       count($heap);// refers to MyHeap->count() method
+} catch (Exception $e) {
+       echo "Exception: " . $e->getMessage() . "\n";
+}
 
 ?>
---EXPECTF--
-Fatal error: Uncaught Exception: Cause count to fail in %s
-Stack trace:
-#0 [internal function]: MyHeap->count()
-#1 %s count(Object(MyHeap))
-#2 {main}
-  thrown in %s on line %d
+--EXPECT--
+Exception: Cause count to fail