summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt')
-rw-r--r--ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt17
1 files changed, 17 insertions, 0 deletions
diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt
new file mode 100644
index 0000000..671e4b3
--- /dev/null
+++ b/ext/pdo_sqlite/tests/pdo_sqlite_createaggregate_002.phpt
@@ -0,0 +1,17 @@
+--TEST--
+PDO_sqlite: Testing invalid callback for sqliteCreateAggregate()
+--SKIPIF--
+<?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?>
+--FILE--
+<?php
+
+$pdo = new PDO('sqlite::memory:');
+
+$pdo->sqliteCreateAggregate('foo', 'a', '');
+$pdo->sqliteCreateAggregate('foo', 'strlen', '');
+
+?>
+--EXPECTF--
+Warning: PDO::sqliteCreateAggregate(): function 'a' is not callable in %s on line %d
+
+Warning: PDO::sqliteCreateAggregate(): function '' is not callable in %s on line %d