]> granicus.if.org Git - php/commitdiff
- Fixed tests
authorFelipe Pena <felipe@php.net>
Tue, 2 Dec 2008 23:06:52 +0000 (23:06 +0000)
committerFelipe Pena <felipe@php.net>
Tue, 2 Dec 2008 23:06:52 +0000 (23:06 +0000)
ext/pdo_sqlite/tests/pdo_sqlite_createaggregate.phpt
ext/pdo_sqlite/tests/pdo_sqlite_createfunction.phpt
ext/pdo_sqlite/tests/pdo_sqlite_lastinsertid.phpt

index aa268a93302d618ef0f519a2f125de8bdc313505..8661e36794d3894c23de501bc60aecadbd41e94a 100644 (file)
@@ -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) {
index 8a93002e676de0c40b3164bee977037948d1c98a..74a79faed097ba2783bb6a716435212ed10313c1 100644 (file)
@@ -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) {
index 8fc309d94bd25ae4b68b2b1a8a40ccac148322c6..d930e7f0a7db9df379ec8480ba8dee169688a49b 100644 (file)
@@ -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"