diff options
author | tailor <cygnus@janrain.com> | 2006-01-19 23:07:36 +0000 |
---|---|---|
committer | tailor <cygnus@janrain.com> | 2006-01-19 23:07:36 +0000 |
commit | 2ede38d778de1b86affbdff0b9fdbf9fdd2c3e21 (patch) | |
tree | d868025d1a8368ef8754cddf8e6a9e11fb80c300 /Tests/Auth/OpenID/StoreTest.php | |
parent | 33f728025945eb0f03392a9141d67dd7ba019d04 (diff) | |
download | php-openid-2ede38d778de1b86affbdff0b9fdbf9fdd2c3e21.zip php-openid-2ede38d778de1b86affbdff0b9fdbf9fdd2c3e21.tar.gz php-openid-2ede38d778de1b86affbdff0b9fdbf9fdd2c3e21.tar.bz2 |
[project @ Added logic to make SQL store tests succeed but not run if database extensions are unavailable]
Diffstat (limited to 'Tests/Auth/OpenID/StoreTest.php')
-rw-r--r-- | Tests/Auth/OpenID/StoreTest.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Tests/Auth/OpenID/StoreTest.php b/Tests/Auth/OpenID/StoreTest.php index 217f670..1949973 100644 --- a/Tests/Auth/OpenID/StoreTest.php +++ b/Tests/Auth/OpenID/StoreTest.php @@ -286,6 +286,14 @@ explicitly'); function test_postgresqlstore() { + // If the postgres extension isn't loaded or loadable, succeed + // because we can't run the test. + if (!(extension_loaded('pgsql') || + @dl('pgsql.' . PHP_SHLIB_SUFFIX))) { + $this->pass(); + return; + } + require_once('Auth/OpenID/Store/SQLStore.php'); require_once('DB.php'); @@ -361,6 +369,14 @@ explicitly'); function test_sqlitestore() { + // If the postgres extension isn't loaded or loadable, succeed + // because we can't run the test. + if (!(extension_loaded('sqlite') || + @dl('sqlite.' . PHP_SHLIB_SUFFIX))) { + $this->pass(); + return; + } + require_once('Auth/OpenID/Store/SQLStore.php'); require_once('DB.php'); @@ -389,6 +405,14 @@ explicitly'); function test_mysqlstore() { + // If the postgres extension isn't loaded or loadable, succeed + // because we can't run the test. + if (!(extension_loaded('mysql') || + @dl('mysql.' . PHP_SHLIB_SUFFIX))) { + $this->pass(); + return; + } + require_once('Auth/OpenID/Store/SQLStore.php'); require_once('DB.php'); |