File: PgsqlTest.php

package info (click to toggle)
php-horde-content 2.0.4-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 308 kB
  • ctags: 377
  • sloc: php: 1,454; xml: 474; makefile: 10; sh: 3
file content (23 lines) | stat: -rw-r--r-- 755 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
/**
 * Prepare the test setup.
 */
require_once __DIR__ . '/../Base.php';

class Content_Sql_Pdo_PgsqlTest extends Content_Test_Sql_Base
{
    public static function setUpBeforeClass()
    {
        if (!extension_loaded('pdo') ||
            !in_array('pgsql', PDO::getAvailableDrivers())) {
            self::$reason = 'No pgsql extension or no pgsql PDO driver';
            return;
        }
        $config = self::getConfig('CONTENT_SQL_PDO_PGSQL_TEST_CONFIG',
                                  __DIR__ . '/../..');
        if ($config && !empty($config['content']['sql']['pdo_pgsql'])) {
            self::$db = new Horde_Db_Adapter_Pdo_Pgsql($config['content']['sql']['pdo_pgsql']);
            parent::setUpBeforeClass();
        }
    }
}