From bc7d3a9484e231753dc3cb4bf38b9fcd884db9b5 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Tue, 2 Dec 2008 23:06:52 +0000 Subject: [PATCH] - Fixed tests --- ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt | 4 +++- ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt | 3 ++- ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt | 6 +----- 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" -- 2.50.1