diff options
author | Trevor Johns <trevor@tjohns.net> | 2007-12-29 08:41:13 +0000 |
---|---|---|
committer | Trevor Johns <trevor@tjohns.net> | 2007-12-29 08:41:13 +0000 |
commit | 3cc885eaa0d293a43e5203dedbddbe119b3b929c (patch) | |
tree | 082f210ef328201e48d2be491ddfdf74a536bff5 /Tests | |
parent | 186d29d923ba41a90c063832d64c7ddbe057592d (diff) | |
download | php-openid-3cc885eaa0d293a43e5203dedbddbe119b3b929c.zip php-openid-3cc885eaa0d293a43e5203dedbddbe119b3b929c.tar.gz php-openid-3cc885eaa0d293a43e5203dedbddbe119b3b929c.tar.bz2 |
[project @ Fixed StoreTest to not fail on Mac OS X 10.5]
Mac OS X 10.5 generates a value for $TMPDIR that looks something like
this:
/var/folders/uU/uXMNhbRIGkOhaxcg60xSGU+++TI/-Tmp-/
The '+++' is causing the DSN in Tests_Auth_OpenID_StoreTest::test_sqlitestore
to become invalid. This invalid DSN causes the SQLite driver to attempt
creating a file at a nonexistant path, resulting in a failed test. This is
fixed by wrapping the value of $TMPDIR received by the system in a call to
urlencode().
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/Auth/OpenID/StoreTest.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Tests/Auth/OpenID/StoreTest.php b/Tests/Auth/OpenID/StoreTest.php index 2cfd741..deb7e4c 100644 --- a/Tests/Auth/OpenID/StoreTest.php +++ b/Tests/Auth/OpenID/StoreTest.php @@ -564,7 +564,7 @@ explicitly'); return null; } - $dsn = sprintf("sqlite:///%s/file.db", $temp_dir); + $dsn = 'sqlite:///' . urlencode($temp_dir) . '/php_openid_storetest.db'; $db =& DB::connect($dsn); if (PEAR::isError($db)) { |