summaryrefslogtreecommitdiff
path: root/ext/spl/tests/heap_corruption.phpt
diff options
context:
space:
mode:
authorJulien Pauli <jpauli@php.net>2014-08-25 18:32:40 +0200
committerJulien Pauli <jpauli@php.net>2014-08-26 10:02:55 +0200
commit0686b4448d7382fcda4e03b8561eaf1b6d990644 (patch)
treebb135aa5079a803c82231a5646c74a5dc15c30d9 /ext/spl/tests/heap_corruption.phpt
parent5d062b61607e79a989899af150bc5f3aae377afe (diff)
downloadphp-git-0686b4448d7382fcda4e03b8561eaf1b6d990644.tar.gz
implement #67886
Diffstat (limited to 'ext/spl/tests/heap_corruption.phpt')
-rw-r--r--ext/spl/tests/heap_corruption.phpt10
1 files changed, 9 insertions, 1 deletions
diff --git a/ext/spl/tests/heap_corruption.phpt b/ext/spl/tests/heap_corruption.phpt
index 284ee1db81..5e9dec7855 100644
--- a/ext/spl/tests/heap_corruption.phpt
+++ b/ext/spl/tests/heap_corruption.phpt
@@ -42,6 +42,8 @@ $heap->insert(4);
$heap->allow_compare = false;
+var_dump($heap->isCorrupted());
+
try {
$heap->extract();
}
@@ -56,7 +58,13 @@ catch (Exception $e) {
echo "Corruption Exception: " . $e->getMessage() . PHP_EOL;
}
+var_dump($heap->isCorrupted());
+$heap->recoverFromCorruption();
+var_dump($heap->isCorrupted());
?>
--EXPECT--
+bool(false)
Compare Exception: Compare exception
-Corruption Exception: Heap is corrupted, heap properties are no longer ensured. \ No newline at end of file
+Corruption Exception: Heap is corrupted, heap properties are no longer ensured.
+bool(true)
+bool(false) \ No newline at end of file