Annotation of embedaddon/php/ext/oci8/tests/drcp_newconnect.phpt, revision 1.1

1.1     ! misho       1: --TEST--
        !             2: DRCP: oci_new_connect()
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
        !             5: --INI--
        !             6: oci8.connection_class=test
        !             7: oci8.old_oci_close_semantics=0
        !             8: --FILE--
        !             9: <?php
        !            10: 
        !            11: require dirname(__FILE__)."/details.inc";
        !            12: 
        !            13: // Open two connections with oci_new_connect
        !            14: // Verify they are different by comparing the resource ids
        !            15: 
        !            16: var_dump($c1 = oci_new_connect($user,$password,$dbase));
        !            17: $rn1 = (int)$c1;
        !            18: 
        !            19: // Another connection now
        !            20: 
        !            21: var_dump($c2 = oci_new_connect($user,$password,$dbase));
        !            22: $rn2 = (int)$c2;
        !            23: 
        !            24: // rn1 and rn2 should be different.
        !            25: 
        !            26: if ($rn1 === $rn2)
        !            27:        echo "First and second connections share a resource: Not OK\n";
        !            28: else
        !            29:        echo "First and second connections are different  OK\n";
        !            30: 
        !            31: // Close the connections
        !            32: oci_close($c1);
        !            33: oci_close($c2);
        !            34: 
        !            35: echo "Done\n";
        !            36: 
        !            37: ?>
        !            38: --EXPECTF--
        !            39: resource(%d) of type (oci8 connection)
        !            40: resource(%d) of type (oci8 connection)
        !            41: First and second connections are different  OK
        !            42: Done
        !            43: 

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