Annotation of embedaddon/php/ext/pgsql/tests/80_bug42783.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: Bug #42783 (pg_insert() does not support an empty value array)
        !             3: --SKIPIF--
        !             4: <?php 
        !             5: require_once('skipif.inc');
        !             6: ?>
        !             7: --FILE--
        !             8: <?php
        !             9: 
        !            10: require_once('config.inc');
        !            11:        
        !            12: $dbh = @pg_connect($conn_str);
        !            13: if (!$dbh) {
        !            14:        die ("Could not connect to the server");
        !            15: }
        !            16: 
        !            17: pg_query("CREATE TABLE php_test (id SERIAL PRIMARY KEY, time TIMESTAMP NOT NULL DEFAULT now())");
        !            18: 
        !            19: pg_insert($dbh, 'php_test', array());
        !            20: 
        !            21: var_dump(pg_fetch_assoc(pg_query("SELECT * FROM php_test")));
        !            22: 
        !            23: pg_query($dbh, "DROP TABLE php_test");
        !            24: pg_close($dbh);
        !            25: ?>
        !            26: ===DONE===
        !            27: --EXPECTF--
        !            28: array(2) {
        !            29:   ["id"]=>
        !            30:   string(%d) "%d"
        !            31:   ["time"]=>
        !            32:   string(%d) "%s"
        !            33: }
        !            34: ===DONE===

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