Annotation of embedaddon/php/ext/soap/tests/bugs/bug42151.phpt, revision 1.1.1.1

1.1       misho       1: --TEST--
                      2: Bug #42151 (__destruct functions not called after catching a SoapFault exception)
                      3: --SKIPIF--
                      4: <?php require_once('skipif.inc'); ?>
                      5: --FILE--
                      6: <?php
                      7: class foo {
                      8:        function __construct(){
                      9:                $foo = @ new SoapClient('httpx://');
                     10:        }
                     11:        function __destruct(){
                     12:                echo 'I never get executed.' . "\n";
                     13:        }
                     14: }
                     15: class bar {
                     16:        function __destruct(){
                     17:                echo 'I don\'t get executed either.' . "\n";
                     18:        }
                     19: }
                     20: try {
                     21:        $bar = new bar();
                     22:        $foo = new foo();
                     23: } catch (Exception $e){
                     24:        echo $e->getMessage() . "\n";
                     25: }
                     26: echo "ok\n";
                     27: ?>
                     28: --EXPECT--
                     29: SOAP-ERROR: Parsing WSDL: Couldn't load from 'httpx://' : failed to load external entity "httpx://"
                     30: 
                     31: ok
                     32: I don't get executed either.

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