Annotation of embedaddon/php/ext/sqlite3/tests/sqlite3_33_createAggregate_notcallable.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: SQLite3::createAggregate() Test whether a supplied PHP function is valid when using in an aggregate function
                      3: --CREDITS--
                      4: James Cauwelier
                      5: # Belgium PHP TestFest (2009)
                      6: --SKIPIF--
                      7: <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
                      8: --FILE--
                      9: <?php
                     10: 
                     11: function aggregate_step ($var) { return $var; }
                     12: function aggregate_final ($var) { return $var; }
                     13: 
                     14: $db = new SQLite3(':memory:');
                     15: 
                     16: $db->createAggregate ('TESTAGGREGATE', 'aggregate_test_step', 'aggregate_final');
                     17: $db->createAggregate ('TESTAGGREGATE2', 'aggregate_step', 'aggregate_test_final');
                     18: var_dump($db->createAggregate ('TESTAGGREGATE3', 'aggregate_step', 'aggregate_final'));
                     19: 
                     20: $db->close();
                     21: 
                     22: echo "Done"
                     23: ?>
                     24: --EXPECTF--
                     25: Warning: SQLite3::createAggregate(): Not a valid callback function aggregate_test_step in %s on line %d
                     26: 
                     27: Warning: SQLite3::createAggregate(): Not a valid callback function aggregate_test_final in %s on line %d
                     28: bool(true)
                     29: Done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>