File:  [ELWIX - Embedded LightWeight unIX -] / embedaddon / php / ext / dba / tests / skipif.inc
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs - revision graph
Tue Feb 21 23:47:54 2012 UTC (12 years, 5 months ago) by misho
Branches: php, MAIN
CVS tags: v5_4_3elwix, v5_4_29p0, v5_4_29, v5_4_20p0, v5_4_20, v5_4_17p0, v5_4_17, v5_3_10, HEAD
php

<?php
	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');
	if (!isset($handler)) {
		$handlers = dba_handlers();
		if (in_array('flatfile', $handlers)) {
			$handler = 'flatfile';
		} else {
			$handlers = array_diff($handlers, array('cdb', 'cdb_make')); /* these can only read OR write */
			if (count($handlers)==0) {
				die('skip no handler available that can be used for the test');
			}
			$handler = array_shift($handlers);
		}
	} else {
		if (!in_array($handler, dba_handlers())) {
			$HND = strtoupper($handler);
			die("skip $HND handler not available");
		}
	}
	$HND = strtoupper($handler);
?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>