Annotation of embedaddon/php/ext/pdo_sqlite/tests/debugdumpparams_001.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Testing PDOStatement::debugDumpParams() with bound params
                      3: --SKIPIF--
                      4: <?php
                      5: if (!extension_loaded('pdo_sqlite')) print 'skip not loaded';
                      6: ?>
                      7: --FILE--
                      8: <?php
                      9: 
                     10: $db = new pdo('sqlite::memory:');
                     11: 
                     12: $x= $db->prepare('select :a, :b, ?');
                     13: $x->bindValue(':a', 1, PDO::PARAM_INT);
                     14: $x->bindValue(':b', 'foo');
                     15: $x->bindValue(3, 1313);
                     16: var_dump($x->debugDumpParams());
                     17: 
                     18: ?>
                     19: --EXPECT--
                     20: SQL: [16] select :a, :b, ?
                     21: Params:  3
                     22: Key: Name: [2] :a
                     23: paramno=-1
                     24: name=[2] ":a"
                     25: is_param=1
                     26: param_type=1
                     27: Key: Name: [2] :b
                     28: paramno=-1
                     29: name=[2] ":b"
                     30: is_param=1
                     31: param_type=2
                     32: Key: Position #2:
                     33: paramno=2
                     34: name=[0] ""
                     35: is_param=1
                     36: param_type=2
                     37: NULL

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