summaryrefslogtreecommitdiff
path: root/ext/exif/tests/exif_tagname_error.phpt
blob: e4f1a8c0c6cee96977c5d3c5b2f9bea1549af49f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
--TEST--
Test exif_tagname() function : error conditions
--SKIPIF--
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
--FILE--
<?php

/* Prototype  :string exif_tagname ( string $index  )
 * Description: Get the header name for an index
 * Source code: ext/exif/exif.c
*/

echo "*** Testing exif_tagname() : error conditions ***\n";

echo "\n-- Testing exif_tagname() function with no arguments --\n";
var_dump( exif_tagname() );

echo "\n-- Testing exif_tagname() function with more than expected no. of arguments --\n";
$extra_arg = 10;
var_dump( exif_tagname(0x10E, $extra_arg) );

?>
===Done===
--EXPECTF--
*** Testing exif_tagname() : error conditions ***

-- Testing exif_tagname() function with no arguments --

Warning: exif_tagname() expects exactly 1 parameter, 0 given in %s on line %d
NULL

-- Testing exif_tagname() function with more than expected no. of arguments --

Warning: exif_tagname() expects exactly 1 parameter, 2 given in %s on line %d
NULL
===Done===