mirror of
https://github.com/php/php-src.git
synced 2025-08-18 15:08:55 +02:00

RFC: https://wiki.php.net/rfc/pdo_driver_specific_subclasses Closes GH-12804 Co-Authored-By: Danack <Danack@basereality.com>
25 lines
728 B
PHP
25 lines
728 B
PHP
--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 PdoSqlite('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--
|
|
PdoSqlite::createAggregate(): Argument #2 ($step) must be a valid callback, function "a" not found or invalid function name
|
|
PdoSqlite::createAggregate(): Argument #3 ($finalize) must be a valid callback, function "" not found or invalid function name
|