Annotation of embedaddon/php/ext/sqlite/tests/sqlitedatabase_arrayquery.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Testing SQLiteDatabase::ArrayQuery with NULL-byte string
        !             3: --SKIPIF--
        !             4: <?php
        !             5: if (!extension_loaded("sqlite")) print "skip";
        !             6: ?>
        !             7: --FILE--
        !             8: <?php
        !             9: 
        !            10: $method = new ReflectionMethod('sqlitedatabase::arrayquery');
        !            11: 
        !            12: $class = $method->getDeclaringClass()->newInstanceArgs(array(':memory:'));
        !            13: 
        !            14: $p = "\0";
        !            15: 
        !            16: $method->invokeArgs($class, array_fill(0, 2, $p));
        !            17: $method->invokeArgs($class, array_fill(0, 1, $p));
        !            18: 
        !            19: ?>
        !            20: --EXPECTF--
        !            21: Warning: SQLiteDatabase::arrayQuery() expects parameter 2 to be long, string given in %s on line %d
        !            22: 
        !            23: Warning: SQLiteDatabase::arrayQuery(): Cannot execute empty query. in %s on line %d

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>