X7ROOT File Manager
Current Path:
/opt/alt/tests/alt-php81-pecl-leveldb_0.3.0-1.el8/tests
opt
/
alt
/
tests
/
alt-php81-pecl-leveldb_0.3.0-1.el8
/
tests
/
ðŸ“
..
📄
001-basic.phpt
(638 B)
📄
002-db-management.phpt
(313 B)
📄
003-openbasedir.phpt
(670 B)
📄
004-write-batch.phpt
(966 B)
📄
005-iterator.phpt
(1.74 KB)
📄
006-iterator-foreach.phpt
(1.05 KB)
📄
007-db-close.phpt
(567 B)
📄
008-options.phpt
(937 B)
📄
009-comparator.phpt
(1.95 KB)
📄
010-compression.phpt
(578 B)
📄
011-getApproximateSizes.phpt
(859 B)
📄
012-getProperty.phpt
(1011 B)
📄
013-compactRange.phpt
(458 B)
📄
014-iterator-destroy.phpt
(547 B)
📄
015-double-iterator.phpt
(512 B)
📄
016-different-iterators-should-differ.phpt
(826 B)
📄
017-db-getIterator.phpt
(648 B)
📄
018-snapshot.phpt
(1.38 KB)
📄
019-null-comparator.phpt
(547 B)
📄
020-null-snapshot.phpt
(469 B)
📄
leveldb.inc
(152 B)
📄
skipif.inc
(90 B)
Editing: 018-snapshot.phpt
--TEST-- leveldb - snapshot --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php $leveldb_path = dirname(__FILE__) . '/leveldb-snapshot.test-db'; @unlink($leveldb_path); $db = new LevelDB($leveldb_path); $db->put("key1", "value1"); $db->put("key2", "value2"); $snapshot = new LevelDBSnapshot($db); $db->put("key3", "value3"); try { $it = new LevelDBIterator($db, array('snapshot' => '')); } catch(LevelDBException $e) { var_dump($e->getMessage()); } $it = $db->getIterator(array('snapshot' => $snapshot)); foreach($it as $k => $v) { echo "$k => $v\n"; } var_dump($db->get("key3", array('snapshot' => $snapshot))); var_dump($db->get("key3")); echo "*** Release snapshot x1 ***\n"; $snapshot->release(); echo "*** Release snapshot x2 ***\n"; $snapshot->release(); echo "*** Try to use released snapshot ***\n"; try { $it = new LevelDBIterator($db, array('snapshot' => $snapshot)); } catch(LevelDBException $e) { var_dump($e->getMessage()); } ?> ==DONE== --CLEAN-- <?php $leveldb_path = dirname(__FILE__) . '/leveldb-snapshot.test-db'; LevelDB::destroy($leveldb_path); ?> --EXPECTF-- string(69) "Invalid snapshot parameter, it must be an instance of LevelDBSnapshot" key1 => value1 key2 => value2 bool(false) string(6) "value3" *** Release snapshot x1 *** *** Release snapshot x2 *** *** Try to use released snapshot *** string(48) "Invalid snapshot parameter, it has been released" ==DONE==
Upload File
Create Folder