cvs: pear /MDB/tests MDB_pear_wrapper_test.php MDB_test.php driver_test.php test.php testchoose.php

From: Date: Sat, 23 Nov 2002 23:45:08 +0000
Subject: cvs: pear /MDB/tests MDB_pear_wrapper_test.php MDB_test.php driver_test.php test.php testchoose.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-7548@lists.php.net to get a copy of this message
lsmith Sat Nov 23 18:45:08 2002 EDT Modified files: /pear/MDB/tests driver_test.php MDB_pear_wrapper_test.php MDB_test.php test.php testchoose.php Log: fixed ini_set call Index: pear/MDB/tests/driver_test.php diff -u pear/MDB/tests/driver_test.php:1.17 pear/MDB/tests/driver_test.php:1.18 --- pear/MDB/tests/driver_test.php:1.17 Thu Nov 14 08:36:46 2002 +++ pear/MDB/tests/driver_test.php Sat Nov 23 18:45:08 2002 @@ -42,10 +42,18 @@ // | Authors: Manuel Lemos <mlemos@acm.org> | // +----------------------------------------------------------------------+ // -// $Id: driver_test.php,v 1.17 2002/11/14 13:36:46 lsmith Exp $ +// $Id: driver_test.php,v 1.18 2002/11/23 23:45:08 lsmith Exp $ // -ini_set('include_path', '../:'.ini_get('include_path')); +// BC hack to define PATH_SEPARATOR for version of PHP prior 4.3 +if(!defined('PATH_SEPARATOR')) { + if(defined('DIRECTORY_SEPARATOR') && DIRECTORY_SEPARATOR == "\\") { + define('PATH_SEPARATOR', ';'); + } else { + define('PATH_SEPARATOR', ':'); + } +} +ini_set('include_path', '../'.PATH_SEPARATOR.ini_get('include_path')); require 'MDB.php'; MDB::loadFile('metabase_wrapper'); Index: pear/MDB/tests/MDB_pear_wrapper_test.php diff -u pear/MDB/tests/MDB_pear_wrapper_test.php:1.18 pear/MDB/tests/MDB_pear_wrapper_test.php:1.19 --- pear/MDB/tests/MDB_pear_wrapper_test.php:1.18 Thu Nov 14 08:36:46 2002 +++ pear/MDB/tests/MDB_pear_wrapper_test.php Sat Nov 23 18:45:08 2002 @@ -1,10 +1,18 @@ <?php -// $Id: MDB_pear_wrapper_test.php,v 1.18 2002/11/14 13:36:46 lsmith Exp $ +// $Id: MDB_pear_wrapper_test.php,v 1.19 2002/11/23 23:45:08 lsmith Exp $ // // MDB test script for the PEAR DB Wrapper. // -ini_set('include_path', '../:'.ini_get('include_path')); +// BC hack to define PATH_SEPARATOR for version of PHP prior 4.3 +if(!defined('PATH_SEPARATOR')) { + if(defined('DIRECTORY_SEPARATOR') && DIRECTORY_SEPARATOR == "\\") { + define('PATH_SEPARATOR', ';'); + } else { + define('PATH_SEPARATOR', ':'); + } +} +ini_set('include_path', '../'.PATH_SEPARATOR.ini_get('include_path')); require_once 'MDB.php'; MDB::loadFile('peardb_wrapper'); Index: pear/MDB/tests/MDB_test.php diff -u pear/MDB/tests/MDB_test.php:1.36 pear/MDB/tests/MDB_test.php:1.37 --- pear/MDB/tests/MDB_test.php:1.36 Thu Nov 14 08:36:46 2002 +++ pear/MDB/tests/MDB_test.php Sat Nov 23 18:45:08 2002 @@ -1,10 +1,18 @@ <?php -// $Id: MDB_test.php,v 1.36 2002/11/14 13:36:46 lsmith Exp $ +// $Id: MDB_test.php,v 1.37 2002/11/23 23:45:08 lsmith Exp $ // // MDB test script. // -ini_set('include_path', '../:'.ini_get('include_path')); +// BC hack to define PATH_SEPARATOR for version of PHP prior 4.3 +if(!defined('PATH_SEPARATOR')) { + if(defined('DIRECTORY_SEPARATOR') && DIRECTORY_SEPARATOR == "\\") { + define('PATH_SEPARATOR', ';'); + } else { + define('PATH_SEPARATOR', ':'); + } +} +ini_set('include_path', '../'.PATH_SEPARATOR.ini_get('include_path')); // MDB.php doesnt have to be included since manager.php does that // manager.php is only necessary for handling xml schema files Index: pear/MDB/tests/test.php diff -u pear/MDB/tests/test.php:1.11 pear/MDB/tests/test.php:1.12 --- pear/MDB/tests/test.php:1.11 Thu Nov 14 08:36:45 2002 +++ pear/MDB/tests/test.php Sat Nov 23 18:45:08 2002 @@ -41,13 +41,21 @@ // | Author: Paul Cooper <pgc@ucecom.com> | // +----------------------------------------------------------------------+ // -// $Id: test.php,v 1.11 2002/11/14 13:36:45 lsmith Exp $ +// $Id: test.php,v 1.12 2002/11/23 23:45:08 lsmith Exp $ /* This is a small test suite for MDB using PHPUnit */ -ini_set('include_path', '../:'.ini_get('include_path')); +// BC hack to define PATH_SEPARATOR for version of PHP prior 4.3 +if(!defined('PATH_SEPARATOR')) { + if(defined('DIRECTORY_SEPARATOR') && DIRECTORY_SEPARATOR == "\\") { + define('PATH_SEPARATOR', ';'); + } else { + define('PATH_SEPARATOR', ':'); + } +} +ini_set('include_path', '../'.PATH_SEPARATOR.ini_get('include_path')); require_once 'PHPUnit.php'; require_once 'test_setup.php'; Index: pear/MDB/tests/testchoose.php diff -u pear/MDB/tests/testchoose.php:1.1 pear/MDB/tests/testchoose.php:1.2 --- pear/MDB/tests/testchoose.php:1.1 Mon Oct 28 10:08:02 2002 +++ pear/MDB/tests/testchoose.php Sat Nov 23 18:45:08 2002 @@ -1,9 +1,20 @@ <?php +// BC hack to define PATH_SEPARATOR for version of PHP prior 4.3 +if(!defined('PATH_SEPARATOR')) { + if(defined('DIRECTORY_SEPARATOR') && DIRECTORY_SEPARATOR == "\\") { + define('PATH_SEPARATOR', ';'); + } else { + define('PATH_SEPARATOR', ':'); + } +} +ini_set('include_path', '../'.PATH_SEPARATOR.ini_get('include_path')); + require_once 'PHPUnit.php'; require_once 'test_setup.php'; require_once 'testUtils.php'; +$output = ''; foreach ($testcases as $testcase) { include_once $testcase . '.php'; $output .= "<div class=\"testlineup\">\n";

« previous php.pear.cvs (#7548) next »