PATH:
opt
/
alt
/
tests
/
alt-php82-pecl-leveldb_0.3.0-1.el8
/
tests
--TEST-- leveldb - write batch --SKIPIF-- <?php include 'skipif.inc'; ?> --FILE-- <?php $leveldb_path = dirname(__FILE__) . '/leveldb_batch.test-db'; $db = new LevelDB($leveldb_path); echo "* batch write with setting\n"; $batch = new LevelDBWriteBatch(); $batch->set('batch_foo', 'batch_bar'); $batch->put('batch_foo2', 'batch_bar2'); $batch->delete('batch_foo'); var_dump($db->write($batch)); var_dump($db->get('batch_foo2')); var_dump($db->get('batch_foo')); echo "* batch write with delete\n"; $batch->clear(); $batch->delete('batch_foo2'); $batch->set('batch_foo', 'batch again'); var_dump($db->write($batch)); var_dump($db->get('batch_foo2')); var_dump($db->get('batch_foo')); ?> --CLEAN-- <?php $leveldb_path = dirname(__FILE__) . '/leveldb_batch.test-db'; LevelDB::destroy($leveldb_path); ?> --EXPECTF-- * batch write with setting bool(true) string(10) "batch_bar2" bool(false) * batch write with delete bool(true) bool(false) string(11) "batch again"
[-] 003-openbasedir.phpt
[edit]
[-] 020-null-snapshot.phpt
[edit]
[-] 004-write-batch.phpt
[edit]
[-] 009-comparator.phpt
[edit]
[-] 012-getProperty.phpt
[edit]
[-] 008-options.phpt
[edit]
[-] 010-compression.phpt
[edit]
[-] leveldb.inc
[edit]
[-] 001-basic.phpt
[edit]
[-] 014-iterator-destroy.phpt
[edit]
[-] 019-null-comparator.phpt
[edit]
[-] 016-different-iterators-should-differ.phpt
[edit]
[-] 011-getApproximateSizes.phpt
[edit]
[-] 007-db-close.phpt
[edit]
[+]
..
[-] 005-iterator.phpt
[edit]
[-] 006-iterator-foreach.phpt
[edit]
[-] 017-db-getIterator.phpt
[edit]
[-] 018-snapshot.phpt
[edit]
[-] 013-compactRange.phpt
[edit]
[-] 015-double-iterator.phpt
[edit]
[-] skipif.inc
[edit]
[-] 002-db-management.phpt
[edit]