Annotation of embedaddon/php/ext/phar/tests/phar_construct_invalidurl.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Phar object passed URL
! 3: --INI--
! 4: default_charset=UTF-8
! 5: --SKIPIF--
! 6: <?php if (!extension_loaded("phar")) die("skip"); ?>
! 7: --FILE--
! 8: <?php
! 9: try {
! 10: $a = new Phar('http://should.fail.com');
! 11: } catch (UnexpectedValueException $e) {
! 12: echo $e->getMessage(),"\n";
! 13: }
! 14: try {
! 15: $a = new Phar('http://');
! 16: } catch (UnexpectedValueException $e) {
! 17: echo $e->getMessage(),"\n";
! 18: }
! 19: try {
! 20: $a = new Phar('http:/');
! 21: } catch (UnexpectedValueException $e) {
! 22: echo $e->getMessage(),"\n";
! 23: }
! 24: ?>
! 25: ===DONE===
! 26: --EXPECT--
! 27: Cannot create a phar archive from a URL like "http://should.fail.com". Phar objects can only be created from local files
! 28: Cannot create a phar archive from a URL like "http://". Phar objects can only be created from local files
! 29: Cannot create phar 'http:/', file extension (or combination) not recognised or the directory does not exist
! 30: ===DONE===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>