summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Dovgal <tony2001@php.net>2009-01-05 16:02:04 +0000
committerAntony Dovgal <tony2001@php.net>2009-01-05 16:02:04 +0000
commit9b9cd5421dcbd4d4cabd11acdbdcd437785abf89 (patch)
tree95166e94c163835b97476e0f020aa0619972120b
parent24163ce0b295a7482c41cc328b7f9f07c812494a (diff)
downloadphp-git-9b9cd5421dcbd4d4cabd11acdbdcd437785abf89.tar.gz
create temporary db in the current dir and cleanup on completion
-rw-r--r--ext/pdo/tests/bug_44159.phpt6
1 files changed, 4 insertions, 2 deletions
diff --git a/ext/pdo/tests/bug_44159.phpt b/ext/pdo/tests/bug_44159.phpt
index d78b12fb91..9f1961c267 100644
--- a/ext/pdo/tests/bug_44159.phpt
+++ b/ext/pdo/tests/bug_44159.phpt
@@ -4,14 +4,14 @@ Bug #44159 (Crash: $pdo->setAttribute(PDO::STATEMENT_ATTR_CLASS, NULL))
<?php # vim:ft=php
if (!extension_loaded('pdo')) die('skip PDO not available');
try {
- $pdo = new PDO("sqlite:/tmp/foo.db");
+ $pdo = new PDO("sqlite:".__DIR__."/foo.db");
} catch (Exception $e) {
die("skip PDP_SQLITE not available");
}
?>
--FILE--
<?php
-$pdo = new PDO("sqlite:/tmp/foo.db");
+$pdo = new PDO("sqlite:".__DIR__."/foo.db");
$attrs = array(PDO::ATTR_STATEMENT_CLASS, PDO::ATTR_STRINGIFY_FETCHES, PDO::NULL_TO_STRING);
@@ -21,6 +21,8 @@ foreach ($attrs as $attr) {
var_dump($pdo->setAttribute($attr, 'nonsense'));
}
+@unlink(__DIR__."/foo.db");
+
?>
--EXPECTF--
Warning: PDO::setAttribute(): SQLSTATE[HY000]: General error: PDO::ATTR_STATEMENT_CLASS requires format array(classname, array(ctor_args)); the classname must be a string specifying an existing class in %s on line %d