php-src/ext/pdo_firebird/tests/testdb.inc
Christoph M. Becker e4757ecc80 Re-add common PDO tests to Firebird test suite
These have been inadvertently dropped when changing the test suite to
not require ext/interbase anymore, so we add them back.

We also change the required environment variable names to match the
usual PDO names.  Particularly, we replace `PDO_FIREBIRD_TEST_HOSTNAME`
and `_DATABASE` with the more flexible `PDO_FIREBIRD_TEST_DSN`.
2019-05-04 14:24:15 +02:00

21 lines
595 B
PHP

<?php
// Test defaults, assumes the following:
//
// Username: SYSDBA
// Password: phpfi
// Database: <nothing>
//
// A DSN must be specified by using PDO_FIREBIRD_TEST_DSN
define('PDO_FIREBIRD_TEST_USER', getenv('PDO_FIREBIRD_TEST_USER') ?: 'SYSDBA');
define('PDO_FIREBIRD_TEST_PASS', getenv('PDO_FIREBIRD_TEST_PASS') ?: 'phpfi');
define('PDO_FIREBIRD_TEST_DSN', getenv('PDO_FIREBIRD_TEST_DSN') ?: '');
if(!PDO_FIREBIRD_TEST_DSN)
{
die('Error: PDO_FIREBIRD_TEST_DSN must be set');
}
$dbh = new PDO(PDO_FIREBIRD_TEST_DSN, PDO_FIREBIRD_TEST_USER, PDO_FIREBIRD_TEST_PASS) or die;
?>