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