Annotation of embedaddon/php/ext/libxml/tests/004.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: libxml_set_streams_context()
! 3: --SKIPIF--
! 4: <?php if (!extension_loaded('dom')) die('skip'); ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: $ctxs = array(
! 9: NULL,
! 10: 'bogus',
! 11: 123,
! 12: new stdclass,
! 13: array('a'),
! 14: stream_context_create(),
! 15: stream_context_create(array('file')),
! 16: stream_context_create(array('file' => array('some_opt' => 'aaa')))
! 17: );
! 18:
! 19:
! 20: foreach ($ctxs as $ctx) {
! 21: var_dump(libxml_set_streams_context($ctx));
! 22: $dom = new DOMDocument();
! 23: var_dump($dom->load(dirname(__FILE__).'/test.xml'));
! 24: }
! 25:
! 26: echo "Done\n";
! 27:
! 28: ?>
! 29: --EXPECTF--
! 30: Warning: stream_context_create(): options should have the form ["wrappername"]["optionname"] = $value in %s004.php on line 10
! 31: NULL
! 32:
! 33: Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
! 34: bool(true)
! 35: NULL
! 36:
! 37: Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
! 38: bool(true)
! 39: NULL
! 40:
! 41: Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
! 42: bool(true)
! 43: NULL
! 44:
! 45: Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
! 46: bool(true)
! 47: NULL
! 48:
! 49: Warning: DOMDocument::load(): supplied argument is not a valid Stream-Context resource in %s004.php on line 18
! 50: bool(true)
! 51: NULL
! 52: bool(true)
! 53: NULL
! 54: bool(true)
! 55: NULL
! 56: bool(true)
! 57: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>