File:
[ELWIX - Embedded LightWeight unIX -] /
embedaddon /
php /
ext /
exif /
tests /
exif_imagetype_error.phpt
Revision
1.1.1.1 (vendor branch):
download - view:
text,
annotated -
select for diffs -
revision graph
Tue Feb 21 23:47:54 2012 UTC (12 years, 7 months ago) by
misho
Branches:
php,
MAIN
CVS tags:
v5_4_3elwix,
v5_4_29p0,
v5_4_29,
v5_4_20p0,
v5_4_20,
v5_4_17p0,
v5_4_17,
v5_3_10,
HEAD
php
--TEST--
Test exif_imagetype() function : error conditions
--SKIPIF--
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
--FILE--
<?php
/* Prototype : int exif_imagetype ( string $filename )
* Description: Determine the type of an image
* Source code: ext/exif/exif.c
*/
echo "*** Testing exif_imagetype() : error conditions ***\n";
echo "\n-- Testing exif_imagetype() function with no arguments --\n";
var_dump( exif_imagetype() );
echo "\n-- Testing exif_imagetype() function with more than expected no. of arguments --\n";
$extra_arg = 10;
var_dump( exif_imagetype(dirname(__FILE__).'/test2.jpg', $extra_arg) );
echo "\n-- Testing exif_imagetype() function with an unknown file --\n";
var_dump( exif_imagetype(dirname(__FILE__).'/foo.jpg') );
?>
===Done===
--EXPECTF--
*** Testing exif_imagetype() : error conditions ***
-- Testing exif_imagetype() function with no arguments --
Warning: exif_imagetype() expects exactly 1 parameter, 0 given in %s on line %d
NULL
-- Testing exif_imagetype() function with more than expected no. of arguments --
Warning: exif_imagetype() expects exactly 1 parameter, 2 given in %s on line %d
NULL
-- Testing exif_imagetype() function with an unknown file --
Warning: exif_imagetype(%s/foo.jpg): failed to open stream: No such file or directory in %s on line %d
bool(false)
===Done===
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>