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

1.1     ! misho       1: --TEST--
        !             2: DRCP: oci_connect() with oci_close() and oci8.old_oci_close_semantics OFF
        !             3: --SKIPIF--
        !             4: <?php if (!extension_loaded('oci8')) die("skip no oci8 extension"); ?>
        !             5: --INI--
        !             6: oci8.old_oci_close_semantics=0
        !             7: oci8.connection_class=test
        !             8: --FILE--
        !             9: <?php
        !            10: 
        !            11: require dirname(__FILE__)."/details.inc";
        !            12: 
        !            13: // Test will open a connection
        !            14: // Close the connection
        !            15: // Open another connection
        !            16: // With oci_close() the connection is released to the pool and hence the
        !            17: // the second conneciton will be different
        !            18: 
        !            19: 
        !            20: // OCI_CONNECT
        !            21: echo "This is with a OCI_CONNECT\n";
        !            22: var_dump($conn1 = oci_connect($user,$password,$dbase));
        !            23: $rn1 = (int)$conn1;
        !            24: oci_close($conn1);
        !            25: 
        !            26: // Open another connection
        !            27: var_dump($conn2 = oci_connect($user,$password,$dbase));
        !            28: $rn2 = (int)$conn2;
        !            29: oci_close($conn2);
        !            30: 
        !            31: // Compare the resource numbers
        !            32: 
        !            33: if ($rn1 === $rn2)
        !            34:        echo "Both connections share a resource : NOT OK \n";
        !            35: else
        !            36:        echo "Both connections are different : OK \n";
        !            37: 
        !            38: echo "Done\n";
        !            39: 
        !            40: ?>
        !            41: --EXPECTF--
        !            42: This is with a OCI_CONNECT
        !            43: resource(%d) of type (oci8 connection)
        !            44: resource(%d) of type (oci8 connection)
        !            45: Both connections are different : OK 
        !            46: Done

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