1--TEST--
2PDO_sqlite: Testing invalid callback for createAggregate()
3--EXTENSIONS--
4pdo_sqlite
5--FILE--
6<?php
7
8// This test was copied from the pdo_sqlite test for sqliteCreateAggregate
9$pdo = new Pdo\Sqlite('sqlite::memory:');
10
11try {
12    $pdo->createAggregate('foo', 'a', '');
13} catch (\TypeError $e) {
14    echo $e->getMessage() . \PHP_EOL;
15}
16try {
17    $pdo->createAggregate('foo', 'strlen', '');
18} catch (\TypeError $e) {
19    echo $e->getMessage() . \PHP_EOL;
20}
21
22?>
23--EXPECT--
24Pdo\Sqlite::createAggregate(): Argument #2 ($step) must be a valid callback, function "a" not found or invalid function name
25Pdo\Sqlite::createAggregate(): Argument #3 ($finalize) must be a valid callback, function "" not found or invalid function name
26