!framework/SyncML/tests/testpacket.php
!framework/SyncML/tests/testsync.php
!framework/XML_WBXML/tests/decode.php
+framework/Db/test/Horde/Db/Adapter/conf.php
+framework/Kolab_Storage/test/Horde/Kolab/Storage/conf.php
# Dynamically generated content that may live in the repo directories
/lib/
if (!class_exists('CacheMock', false)) eval('class CacheMock { function get($key) { return $this->$key; } function set($key, $val) { $this->$key = $val; } } ?>');
$cache = new CacheMock;
- $config = array(
- 'host' => 'localhost',
- 'username' => '',
- 'password' => '',
- 'dbname' => 'test',
- 'cache' => $cache,
- );
- if (isset($_ENV['HORDE_DB_TEST_DSN_MYSQLI']))
- $config = array_merge($config, @json_decode($_ENV['HORDE_DB_TEST_DSN_MYSQLI'], true));
+ $config = getenv('DB_ADAPTER_MYSQLI_TEST_CONFIG');
+ if ($config === false) {
+ $config = dirname(__FILE__) . '/conf.php';
+ }
+ if (file_exists($config)) {
+ require $config;
+ $conf['db']['adapter']['mysqli']['test']['cache'] = $cache;
+ }
+ if (!isset($conf['db']['adapter']['mysqli']['test'])) {
+ throw new Exception('No configuration for mysqli test.');
+ }
- $conn = new Horde_Db_Adapter_Mysqli($config);
+ $conn = new Horde_Db_Adapter_Mysqli($conf['db']['adapter']['mysqli']['test']);
return array($conn, $cache);
}
if (!class_exists('CacheMock', false)) eval('class CacheMock { function get($key) { return $this->$key; } function set($key, $val) { $this->$key = $val; } } ?>');
$cache = new CacheMock;
- $config = array(
- 'host' => 'localhost',
- 'username' => '',
- 'password' => '',
- 'dbname' => 'test',
- 'cache' => $cache,
- );
- if (isset($_ENV['HORDE_DB_TEST_DSN_PDO_MYSQL']))
- $config = array_merge($config, @json_decode($_ENV['HORDE_DB_TEST_DSN_PDO_MYSQL'], true));
+ $config = getenv('DB_ADAPTER_PDO_MYSQL_TEST_CONFIG');
+ if ($config === false) {
+ $config = dirname(__FILE__) . '/../conf.php';
+ }
+ if (file_exists($config)) {
+ require $config;
+ $conf['db']['adapter']['pdo']['mysql']['test']['cache'] = $cache;
+ }
+ if (!isset($conf['db']['adapter']['pdo']['mysql']['test'])) {
+ throw new Exception('No configuration for pdo mysql test.');
+ }
- $conn = new Horde_Db_Adapter_Pdo_Mysql($config);
+ $conn = new Horde_Db_Adapter_Pdo_Mysql($conf['db']['adapter']['pdo']['mysql']['test']);
return array($conn, $cache);
}
if (!class_exists('CacheMock', false)) eval('class CacheMock { function get($key) { return $this->$key; } function set($key, $val) { $this->$key = $val; } } ?>');
$cache = new CacheMock;
- $config = array(
- 'username' => '',
- 'password' => '',
- 'dbname' => 'test',
- 'cache' => $cache,
- );
- if (isset($_ENV['HORDE_DB_TEST_DSN_PDO_PGSQL']))
- $config = array_merge($config, @json_decode($_ENV['HORDE_DB_TEST_DSN_PDO_PGSQL'], true));
+ $config = getenv('DB_ADAPTER_PDO_PGSQL_TEST_CONFIG');
+ if ($config === false) {
+ $config = dirname(__FILE__) . '/../conf.php';
+ }
+ if (file_exists($config)) {
+ require $config;
+ $conf['db']['adapter']['pdo']['pgsql']['test']['cache'] = $cache;
+ }
+ if (!isset($conf['db']['adapter']['pdo']['pgsql']['test'])) {
+ throw new Exception('No configuration for pdo pgsql test.');
+ }
- $conn = new Horde_Db_Adapter_Pdo_Pgsql($config);
+ $conn = new Horde_Db_Adapter_Pdo_Pgsql($conf['db']['adapter']['pdo']['pgsql']['test']);
return array($conn, $cache);
}
--- /dev/null
+<?php
+$conf['db']['adapter']['mysqli']['test']['host'] = 'localhost';
+$conf['db']['adapter']['mysqli']['test']['username'] = '';
+$conf['db']['adapter']['mysqli']['test']['password'] = '';
+$conf['db']['adapter']['mysqli']['test']['dbname'] = 'test';
+$conf['db']['adapter']['pdo']['mysql']['test']['host'] = 'localhost';
+$conf['db']['adapter']['pdo']['mysql']['test']['username'] = '';
+$conf['db']['adapter']['pdo']['mysql']['test']['password'] = '';
+$conf['db']['adapter']['pdo']['mysql']['test']['dbname'] = 'test';
+$conf['db']['adapter']['pdo']['pgsql']['test']['username'] = '';
+$conf['db']['adapter']['pdo']['pgsql']['test']['password'] = '';
+$conf['db']['adapter']['pdo']['pgsql']['test']['dbname'] = 'test';
*/
class Horde_Db_AllTests extends Horde_Test_AllTests
{
+ /**
+ * Main entry point for running the suite.
+ */
+ public static function main()
+ {
+ PHPUnit_TextUI_TestRunner::run(self::suite());
+ }
+
public static function suite()
{
// Catch strict standards
self::$_file = $file;
}
- PHPUnit_TextUI_TestRunner::run(self::detectTestFixture(self::suite()));
+ PHPUnit_TextUI_TestRunner::run(self::suite());
}
/**
*/
public static function detectTestFixture(PHPUnit_Framework_TestSuite $suite)
{
- $config = getenv('KOLAB_TEST_CONFIG');
+ $config = getenv('KOLAB_STORAGE_TEST_CONFIG');
if ($config === false) {
- $config = '/kolab/etc/kolab/php_unit_server_testing.php';
+ $config = dirname(__FILE__) . '/conf.php';
}
if (file_exists($config)) {
require $config;
--- /dev/null
+<?php
+$conf['kolab']['storage']['test']['host'] = 'localhost';
+$conf['kolab']['storage']['test']['user'] = '';
+$conf['kolab']['storage']['test']['pass'] = '';
+$conf['kolab']['storage']['test']['debug'] = '';