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

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

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