summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelipe Pena <felipe@php.net>2008-12-02 23:06:52 +0000
committerFelipe Pena <felipe@php.net>2008-12-02 23:06:52 +0000
commitbc7d3a9484e231753dc3cb4bf38b9fcd884db9b5 (patch)
treebd5264d578d232f8bbba42315f500f4296ee7fd9
parent03eb1fd6234956667d35b40e23d8f4dabcf47726 (diff)
downloadphp-git-bc7d3a9484e231753dc3cb4bf38b9fcd884db9b5.tar.gz
- Fixed tests
-rw-r--r--ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt4
-rw-r--r--ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt3
-rw-r--r--ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt6
3 files changed, 6 insertions, 7 deletions
diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
index aa268a9330..8661e36794 100644
--- a/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
+++ b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
@@ -10,7 +10,9 @@ $db->query('CREATE TABLE IF NOT EXISTS foobar (id INT AUTO INCREMENT, name TEXT)
$db->query('INSERT INTO foobar VALUES (NULL, "PHP")');
$db->query('INSERT INTO foobar VALUES (NULL, "PHP6")');
-$db->sqliteCreateAggregate('testing', function(&$a, $b) { $a .= $b; return $a; }, function(&$v) { return $v; });
+function test_a(&$a, $b) { $a .= $b; return $a; }
+function test_b(&$a) { return $a; }
+$db->sqliteCreateAggregate('testing', 'test_a', 'test_b');
foreach ($db->query('SELECT testing(name) FROM foobar') as $row) {
diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
index 8a93002e67..74a79faed0 100644
--- a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
+++ b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
@@ -11,7 +11,8 @@ $db->query('INSERT INTO foobar VALUES (NULL, "PHP")');
$db->query('INSERT INTO foobar VALUES (NULL, "PHP6")');
-$db->sqliteCreateFunction('testing', function($v) { return strtolower($v); });
+function test($v) { return strtolower($v); }
+$db->sqliteCreateFunction('testing', 'test');
foreach ($db->query('SELECT testing(name) FROM foobar') as $row) {
diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
index 8fc309d94b..d930e7f0a7 100644
--- a/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
+++ b/ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt
@@ -19,12 +19,8 @@ object(PDOStatement)#2 (1) {
["queryString"]=>
%string|unicode%(17) "SELECT * FROM foo"
}
-array(3) {
+array(1) {
[0]=>
%string|unicode%(5) "00000"
- [1]=>
- NULL
- [2]=>
- NULL
}
%string|unicode%(1) "2"