]> granicus.if.org Git - php/commitdiff
cdb interface is currently readonly
authorMarcus Boerger <helly@php.net>
Sun, 3 Nov 2002 15:22:32 +0000 (15:22 +0000)
committerMarcus Boerger <helly@php.net>
Sun, 3 Nov 2002 15:22:32 +0000 (15:22 +0000)
ext/dba/tests/dba_cdb.phpt
ext/dba/tests/dba_cdb_read.phpt
ext/dba/tests/skipif.inc
ext/dba/tests/test.inc

index 88873e917e24e3313ed95123c0428a8ea8c406f7..c1828f550e8f51185fd027c9cc035bbd4b5bdc03 100644 (file)
@@ -4,6 +4,7 @@ DBA CDB handler test
 <?php 
        require_once('skipif.inc');
        if (!in_array('cdb', dba_handlers())) die('skip CDB handler not available');
+       die('skip CDB currently supports only reading');
 ?>
 --FILE--
 <?php
index 8598d19d2e9388d9e1e4d334d5a002ba5213dc8d..6ead2f34d9a9be507978e1a8d3ddcb378f16ad79 100644 (file)
@@ -2,7 +2,7 @@
 DBA CDB handler test (read only)
 --SKIPIF--
 <?php 
-       require_once('skipif.inc');
+       if (!extension_loaded('dba')) die('skip dba extension not available');
        if (!in_array('cdb', dba_handlers())) die('skip CDB handler not available');
 ?>
 --FILE--
index 9a35e1e06b4a628b5e5688aabfbad6912d7a4a88..3dc7157fe0860536c377f92f011c1d9d614cf969 100644 (file)
@@ -2,4 +2,11 @@
        if (!extension_loaded('dba')) die('skip dba extension not available');
        if (!function_exists('dba_handlers')) die ('skip dba_handlers() not available');
        if (!sizeof(dba_handlers())) die('skip no handlers installed');
+       // CDB currently supports only reading 
+       $handler = dba_handlers(); 
+       if ($handler[0]=='cdb') {
+               if (count($handler)==1) {
+                       die('skip CDB currently supports only reading ');
+               }
+       }
 ?>
index 3ca3a4919485cee1f4c57ed837ccf14d138b63b4..768fc8dac53ecdd069867cd6283ed26f17d582e0 100644 (file)
@@ -1,5 +1,13 @@
 <?php
        $db_file = dirname(__FILE__).'/test0.dbm'; 
        $handler = dba_handlers(); 
-       $handler = $handler[0];
+       // CDB currently supports only reading 
+       if ($handler[0]=='cdb') {
+               if (count($handler)==1) {
+                       die('CDB currently supports only reading ');
+               }
+               $handler = $handler[1];
+       } else {
+               $handler = $handler[0];
+       }
 ?>