| 1 |
lars |
1 |
<?php
|
|
|
2 |
/**This file allows you to change settings for all unit tests.
|
|
|
3 |
*
|
|
|
4 |
* LICENSE:
|
|
|
5 |
* This source file is subject to version 2.1 of the LGPL
|
|
|
6 |
* that is bundled with this package in the file LICENSE.
|
|
|
7 |
*
|
|
|
8 |
* COPYRIGHT:
|
|
|
9 |
* Empowered Media
|
|
|
10 |
* http://www.empoweredmedia.com
|
|
|
11 |
* 481 Eighth Avenue Suite 1530
|
|
|
12 |
* New York, NY 10001
|
|
|
13 |
*
|
|
|
14 |
* @copyright Empowered Media 2006
|
|
|
15 |
* @license http://www.gnu.org/copyleft/lesser.html LGPL Version 2.1
|
|
|
16 |
* @author Lukas Feiler <lukas.feiler@lukasfeiler.com>
|
|
|
17 |
* @package XML_Query2XML
|
|
|
18 |
* @version $Id: settings.php 302587 2010-08-20 23:53:59Z clockwerx $
|
|
|
19 |
*/
|
|
|
20 |
|
|
|
21 |
if (getenv('PHP_PEAR_XML_QUERY2XML_TEST_DSN') != '') {
|
|
|
22 |
define('DSN', getenv('PHP_PEAR_XML_QUERY2XML_TEST_DSN'));
|
|
|
23 |
} else {
|
|
|
24 |
//define('DSN', 'mysql://root@localhost/Query2XML_Tests');
|
|
|
25 |
//define('DSN', 'pgsql://postgres:test@localhost/query2xml_tests');
|
|
|
26 |
define('DSN', 'sqlite:///' . dirname(dirname(__FILE__)) . '/Query2XML_Tests.sq2');
|
|
|
27 |
}
|
|
|
28 |
|
|
|
29 |
if (getenv('PHP_PEAR_XML_QUERY2XML_TEST_LDAPCONFIG') != '') {
|
|
|
30 |
$keyValuePairs = explode(',', getenv('PHP_PEAR_XML_QUERY2XML_TEST_LDAPCONFIG'));
|
|
|
31 |
for ($i = 0; $i < count($keyValuePairs); $i++) {
|
|
|
32 |
$keyValue = explode('=', $keyValuePairs[$i]);
|
|
|
33 |
$ldapConfig[$keyValue[0]] = $keyValue[1];
|
|
|
34 |
}
|
|
|
35 |
} else {
|
|
|
36 |
$ldapConfig = array(
|
|
|
37 |
'host' => 'localhost',
|
|
|
38 |
'port' => 389,
|
|
|
39 |
'version' => 3,
|
|
|
40 |
'starttls' => false,
|
|
|
41 |
'binddn' => '',
|
|
|
42 |
'bindpw' => ''
|
|
|
43 |
);
|
|
|
44 |
}
|
|
|
45 |
?>
|