com php-src: Add user contributed test. Bug #61748: ext/pdo_sqlite/tests/pdo_sqlite_createfunction_00 2.phpt
| From: | Yasuo Ohgaki | Date: | Fri, 02 Aug 2013 00:52:08 +0000 |
| Subject: | com php-src: Add user contributed test. Bug #61748: ext/pdo_sqlite/tests/pdo_sqlite_createfunction_00 2.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-72805@lists.php.net to get a copy of this message | ||
Commit: cb13f8318b39f72798c3756dcfe55daae4c932e2
Author: Yasuo Ohgaki <yohgaki@php.net> Fri, 2 Aug 2013 09:52:08 +0900
Parents: 4590070f31bf93b351a5c2b0b023479265477a60
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=cb13f8318b39f72798c3756dcfe55daae4c932e2
Log:
Add user contributed test. Bug #61748
Bugs:
https://bugs.php.net/61748
Changed paths:
A ext/pdo_sqlite/tests/pdo_sqlite_createfunction_002.phpt
Diff:
diff --git a/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_002.phpt
b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_002.phpt
new file mode 100644
index 0000000..a1d890a
--- /dev/null
+++ b/ext/pdo_sqlite/tests/pdo_sqlite_createfunction_002.phpt
@@ -0,0 +1,17 @@
+--TEST--
+PDO_sqlite: Testing sqliteCreateFunction() produces warning when
+un-callable function passed
+--CREDITS--
+Chris MacPherson chris@kombine.co.uk
+--SKIPIF--
+<?php if (!extension_loaded('pdo_sqlite')) print 'skip not loaded'; ?>
+--FILE--
+<?php
+
+$db = new PDO( 'sqlite::memory:');
+
+$db->sqliteCreateFunction('bar-alias', 'bar');
+
+?>
+--EXPECTF--
+Warning: PDO::sqliteCreateFunction(): function 'bar' is not callable in %s on line %d