Skip to content

Commit

Permalink
[jan] Add unit tests for Oracle.
Browse files Browse the repository at this point in the history
  • Loading branch information
yunosh committed Jun 4, 2014
1 parent 6248e91 commit 4b152e5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 8 deletions.
1 change: 1 addition & 0 deletions content/docs/CHANGES
Expand Up @@ -2,6 +2,7 @@
v2.0.5-git
----------

[jan] Add unit tests for Oracle.


------
Expand Down
10 changes: 6 additions & 4 deletions content/package.xml
Expand Up @@ -16,7 +16,7 @@
<email>mrubinsk@horde.org</email>
<active>yes</active>
</lead>
<date>2014-06-02</date>
<date>2014-06-04</date>
<version>
<release>2.0.5</release>
<api>2.0.0</api>
Expand All @@ -27,7 +27,7 @@
</stability>
<license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
*
* [jan] Add unit tests for Oracle.
</notes>
<contents>
<dir baseinstalldir="/" name="/">
Expand Down Expand Up @@ -115,6 +115,7 @@
<file name="Base.php" role="test" />
<file name="MysqliTest.php" role="test" />
<file name="MysqlTest.php" role="test" />
<file name="Oci8Test.php" role="test" />
</dir> <!-- /test/Content/Sql -->
<file name="AllTests.php" role="test" />
<file name="Autoload.php" role="test" />
Expand Down Expand Up @@ -264,6 +265,7 @@
<install as="Content/Sql/Base.php" name="test/Content/Sql/Base.php" />
<install as="Content/Sql/MysqliTest.php" name="test/Content/Sql/MysqliTest.php" />
<install as="Content/Sql/MysqlTest.php" name="test/Content/Sql/MysqlTest.php" />
<install as="Content/Sql/Oci8Test.php" name="test/Content/Sql/Oci8Test.php" />
<install as="Content/Sql/Pdo/MysqlTest.php" name="test/Content/Sql/Pdo/MysqlTest.php" />
<install as="Content/Sql/Pdo/PgsqlTest.php" name="test/Content/Sql/Pdo/PgsqlTest.php" />
<install as="Content/Sql/Pdo/SqliteTest.php" name="test/Content/Sql/Pdo/SqliteTest.php" />
Expand Down Expand Up @@ -495,10 +497,10 @@
<stability>
<release>stable</release>
<api>stable</api></stability>
<date>2014-06-02</date>
<date>2014-06-04</date>
<license uri="http://www.horde.org/licenses/bsd">BSD-2-Clause</license>
<notes>
*
* [jan] Add unit tests for Oracle.
</notes>
</release>
</changelog>
Expand Down
31 changes: 31 additions & 0 deletions content/test/Content/Sql/Oci8Test.php
@@ -0,0 +1,31 @@
<?php
/**
* Prepare the test setup.
*/
require_once __DIR__ . '/Base.php';

/**
* Copyright 2010-2014 Horde LLC (http://www.horde.org/)
*
* @author Jan Schneider <jan@horde.org>
* @category Horde
* @package Content
* @subpackage UnitTests
* @license http://www.horde.org/licenses/lgpl21 LGPL 2.1
*/
class Content_Sql_Oci8Test extends Content_Test_Sql_Base
{
public static function setUpBeforeClass()
{
if (!extension_loaded('oci8')) {
self::$reason = 'No oci8 extension';
return;
}
$config = self::getConfig('CONTENT_SQL_OCI8_TEST_CONFIG',
__DIR__ . '/..');
if ($config && !empty($config['content']['sql']['oci8'])) {
self::$db = new Horde_Db_Adapter_Oci8($config['content']['sql']['oci8']);
parent::setUpBeforeClass();
}
}
}
8 changes: 4 additions & 4 deletions content/test/Content/conf.php.dist
@@ -1,23 +1,23 @@
<?php
$conf['content']['sql']['mysql']['adapter'] = 'mysql';
$conf['content']['sql']['mysql']['host'] = 'localhost';
$conf['content']['sql']['mysql']['username'] = '';
$conf['content']['sql']['mysql']['password'] = '';
$conf['content']['sql']['mysql']['dbname'] = 'test';
$conf['content']['sql']['mysql']['charset'] = 'utf-8';
$conf['content']['sql']['mysqli']['adapter'] = 'mysqli';
$conf['content']['sql']['mysqli']['host'] = 'localhost';
$conf['content']['sql']['mysqli']['username'] = '';
$conf['content']['sql']['mysqli']['password'] = '';
$conf['content']['sql']['mysqli']['dbname'] = 'test';
$conf['content']['sql']['mysqli']['charset'] = 'utf-8';
$conf['content']['sql']['pdo_mysql']['adapter'] = 'pdo_mysql';
$conf['content']['sql']['oci8']['host'] = 'localhost';
$conf['content']['sql']['oci8']['username'] = '';
$conf['content']['sql']['oci8']['password'] = '';
$conf['content']['sql']['oci8']['charset'] = 'utf-8';
$conf['content']['sql']['pdo_mysql']['host'] = 'localhost';
$conf['content']['sql']['pdo_mysql']['username'] = '';
$conf['content']['sql']['pdo_mysql']['password'] = '';
$conf['content']['sql']['pdo_mysql']['dbname'] = 'test';
$conf['content']['sql']['pdo_mysql']['charset'] = 'utf-8';
$conf['content']['sql']['pdo_pgsql']['adapter'] = 'pdo_pgsql';
$conf['content']['sql']['pdo_pgsql']['username'] = '';
$conf['content']['sql']['pdo_pgsql']['password'] = '';
$conf['content']['sql']['pdo_pgsql']['dbname'] = 'test';
Expand Down

0 comments on commit 4b152e5

Please sign in to comment.