1--TEST--
2Test str_rot13() function : error conditions
3--FILE--
4<?php
5/* Prototype  : string str_rot13  ( string $str  )
6 * Description: Perform the rot13 transform on a string
7 * Source code: ext/standard/string.c
8*/
9echo "*** Testing str_rot13() : error conditions ***\n";
10
11echo "-- Testing str_rot13() function with Zero arguments --\n";
12var_dump( str_rot13() );
13
14echo "\n\n-- Testing str_rot13() function with more than expected no. of arguments --\n";
15$str = "str_rot13() tests starting";
16$extra_arg = 10;
17var_dump( str_rot13( $str, $extra_arg) );
18?>
19===DONE===
20--EXPECTF--
21*** Testing str_rot13() : error conditions ***
22-- Testing str_rot13() function with Zero arguments --
23
24Warning: str_rot13() expects exactly 1 parameter, 0 given in %s on line %d
25NULL
26
27
28-- Testing str_rot13() function with more than expected no. of arguments --
29
30Warning: str_rot13() expects exactly 1 parameter, 2 given in %s on line %d
31NULL
32===DONE===
33