Annotation of embedaddon/php/ext/gd/tests/001.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: imagecreatefrompng() and empty/missing file
! 3: --SKIPIF--
! 4: <?php if (!function_exists("imagecreatefrompng")) print "skip"; ?>
! 5: --FILE--
! 6: <?php
! 7:
! 8: $file = dirname(__FILE__)."/001.test";
! 9: @unlink($file);
! 10:
! 11: var_dump(imagecreatefrompng($file));
! 12: touch($file);
! 13: var_dump(imagecreatefrompng($file));
! 14:
! 15: @unlink($file);
! 16:
! 17: echo "Done\n";
! 18: ?>
! 19: --EXPECTF--
! 20: Warning: imagecreatefrompng(%s001.test): failed to open stream: No such file or directory in %s on line %d
! 21: bool(false)
! 22:
! 23: Warning: imagecreatefrompng(): '%s001.test' is not a valid PNG file in %s on line %d
! 24: bool(false)
! 25: Done
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>