]> granicus.if.org Git - php/commitdiff
adopt new tests
authorWez Furlong <wez@php.net>
Thu, 7 Jul 2005 15:20:06 +0000 (15:20 +0000)
committerWez Furlong <wez@php.net>
Thu, 7 Jul 2005 15:20:06 +0000 (15:20 +0000)
ext/pdo_pgsql/tests/common.phpt [new file with mode: 0644]

diff --git a/ext/pdo_pgsql/tests/common.phpt b/ext/pdo_pgsql/tests/common.phpt
new file mode 100644 (file)
index 0000000..3837009
--- /dev/null
@@ -0,0 +1,23 @@
+--TEST--
+Postgres
+--SKIPIF--
+<?php # vim:ft=php
+if (!extension_loaded('pdo_pgsql')) print 'skip'; ?>
+--REDIRECTTEST--
+# magic auto-configuration
+
+$config = array(
+       'TESTS' => 'ext/pdo/tests'
+);
+
+if (false !== getenv('PDO_PGSQL_TEST_DSN')) {
+       # user set them from their shell
+       $config['ENV']['PDOTEST_DSN'] = getenv('PDO_PGSQL_TEST_DSN');
+       if (false !== getenv('PDO_PGSQL_TEST_ATTR')) {
+               $config['ENV']['PDOTEST_ATTR'] = getenv('PDO_PGSQL_TEST_ATTR');
+       }
+} else {
+       $config['ENV']['PDOTEST_DSN'] = 'pgsql:host=localhost port=5432 dbname=test user=root password=';
+}
+       
+return $config;