]> granicus.if.org Git - php/commitdiff
Fix test
authorScott MacVicar <scottmac@php.net>
Thu, 31 Jul 2008 17:13:31 +0000 (17:13 +0000)
committerScott MacVicar <scottmac@php.net>
Thu, 31 Jul 2008 17:13:31 +0000 (17:13 +0000)
ext/sqlite3/tests/sqlite3_25_create_aggregate.phpt

index d11bfd739d8ba021cb73080f6b9223835ae68061..05913f89a9f8b4e280a3c5c08a3a18f51881fcf0 100644 (file)
@@ -7,19 +7,17 @@ SQLite3::createAggregate() test
 
 require_once(dirname(__FILE__) . '/new_db.inc');
 
-function sum_list_step(&$context, $string) {
+function sum_list_step($context, $num_args, $string) {
        if (empty($context))
        {
                $context = array('total' => 0, 'values' => array());
        }
-       var_dump($context);
        $context['total'] += intval($string);
        $context['values'][] = $context['total'];
-       return true;
+       return $context;
 }
 
-function sum_list_finalize(&$context) {
-       var_dump($context);
+function sum_list_finalize($context) {
        return implode(',', $context['values']);
 }
 
@@ -50,7 +48,11 @@ bool(true)
 bool(true)
 bool(true)
 bool(true)
-
+Array
+(
+    [S(a)] => 1,3,6,10,14
+    [S(b)] => -1,-3,-6,-10,-14
+)
 Closing database
 bool(true)
 Done