cvs: php-src(PHP_5_3) /ext/pdo/tests bug_44159.phpt
| From: | Antony Dovgal | Date: | Mon, 05 Jan 2009 16:02:05 +0000 |
| Subject: | cvs: php-src(PHP_5_3) /ext/pdo/tests bug_44159.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-55359@lists.php.net to get a copy of this message | ||
tony2001 Mon Jan 5 16:02:05 2009 UTC
Modified files: (Branch: PHP_5_3)
/php-src/ext/pdo/tests bug_44159.phpt
Log:
create temporary db in the current dir and cleanup on completion
http://cvs.php.net/viewvc.cgi/php-src/ext/pdo/tests/bug_44159.phpt?r1=1.1.2.4&r2=1.1.2.5&diff_format=u
Index: php-src/ext/pdo/tests/bug_44159.phpt
diff -u php-src/ext/pdo/tests/bug_44159.phpt:1.1.2.4 php-src/ext/pdo/tests/bug_44159.phpt:1.1.2.5
--- php-src/ext/pdo/tests/bug_44159.phpt:1.1.2.4 Mon Jul 21 13:09:28 2008
+++ php-src/ext/pdo/tests/bug_44159.phpt Mon Jan 5 16:02:04 2009
@@ -4,14 +4,14 @@
<?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 @@
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