Annotation of embedaddon/php/ext/sqlite3/tests/sqlite3_29_createfunction.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: SQLite3::createFunction - Basic test
! 3: --SKIPIF--
! 4: <?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: require_once(dirname(__FILE__) . '/new_db.inc');
! 9:
! 10: $func = 'strtoupper';
! 11: var_dump($db->createfunction($func, $func));
! 12: var_dump($db->querySingle('SELECT strtoupper("test")'));
! 13:
! 14: $func2 = 'strtolower';
! 15: var_dump($db->createfunction($func2, $func2));
! 16: var_dump($db->querySingle('SELECT strtolower("TEST")'));
! 17:
! 18: var_dump($db->createfunction($func, $func2));
! 19: var_dump($db->querySingle('SELECT strtoupper("tEst")'));
! 20:
! 21:
! 22: ?>
! 23: --EXPECTF--
! 24: bool(true)
! 25: %string|unicode%(4) "TEST"
! 26: bool(true)
! 27: %string|unicode%(4) "test"
! 28: bool(true)
! 29: %string|unicode%(4) "test"
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>