~ubuntu-branches/ubuntu/quantal/php5/quantal

« back to all changes in this revision

Viewing changes to ext/exif/tests/exif_tagname_error.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Sean Finney
  • Date: 2009-07-01 09:12:10 UTC
  • mto: (0.9.1) (1.1.17 upstream)
  • mto: This revision was merged to the branch mainline in revision 58.
  • Revision ID: james.westby@ubuntu.com-20090701091210-go0h6506p62on17r
Tags: upstream-5.3.0
ImportĀ upstreamĀ versionĀ 5.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Test exif_tagname() function : error conditions 
 
3
--SKIPIF--
 
4
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
 
5
--FILE--
 
6
<?php
 
7
 
 
8
/* Prototype  :string exif_tagname ( string $index  )
 
9
 * Description: Get the header name for an index
 
10
 * Source code: ext/exif/exif.c
 
11
*/
 
12
 
 
13
echo "*** Testing exif_tagname() : error conditions ***\n";
 
14
 
 
15
echo "\n-- Testing exif_tagname() function with no arguments --\n";
 
16
var_dump( exif_tagname() );
 
17
 
 
18
echo "\n-- Testing exif_tagname() function with more than expected no. of arguments --\n";
 
19
$extra_arg = 10;
 
20
var_dump( exif_tagname(0x10E, $extra_arg) );
 
21
 
 
22
?>
 
23
===Done===
 
24
--EXPECTF--
 
25
*** Testing exif_tagname() : error conditions ***
 
26
 
 
27
-- Testing exif_tagname() function with no arguments --
 
28
 
 
29
Warning: exif_tagname() expects exactly 1 parameter, 0 given in %s on line %d
 
30
NULL
 
31
 
 
32
-- Testing exif_tagname() function with more than expected no. of arguments --
 
33
 
 
34
Warning: exif_tagname() expects exactly 1 parameter, 2 given in %s on line %d
 
35
NULL
 
36
===Done===
 
37