Back to index

php5  5.3.10
skipif.inc
Go to the documentation of this file.
00001 <?php
00002        if (!extension_loaded('dba')) die('skip dba extension not available');
00003        if (!function_exists('dba_handlers')) die ('skip dba_handlers() not available');
00004        if (!sizeof(dba_handlers())) die('skip no handlers installed');
00005        if (!isset($handler)) {
00006               $handlers = dba_handlers();
00007               if (in_array('flatfile', $handlers)) {
00008                      $handler = 'flatfile';
00009               } else {
00010                      $handlers = array_diff($handlers, array('cdb', 'cdb_make')); /* these can only read OR write */
00011                      if (count($handlers)==0) {
00012                             die('skip no handler available that can be used for the test');
00013                      }
00014                      $handler = array_shift($handlers);
00015               }
00016        } else {
00017               if (!in_array($handler, dba_handlers())) {
00018                      $HND = strtoupper($handler);
00019                      die("skip $HND handler not available");
00020               }
00021        }
00022        $HND = strtoupper($handler);
00023 ?>