1--TEST--
2Test function proc_nice() by substituting argument 1 with string values.
3--CREDITS--
4Italian PHP TestFest 2009 Cesena 19-20-21 june
5Fabio Fabbrucci (fabbrucci@grupporetina.com)
6Michele Orselli (mo@ideato.it)
7Simone Gentili (sensorario@gmail.com)
8--SKIPIF--
9<?php
10if(!function_exists('proc_nice')) die("skip. proc_nice not available ");
11?>
12--FILE--
13<?php
14
15
16echo "*** Test substituting argument 1 with string values ***\n";
17
18
19
20$heredoc = <<<EOT
21hello world
22EOT;
23
24$variation_array = array(
25  'string DQ' => "string",
26  'string SQ' => 'string',
27  'mixed case string' => "sTrInG",
28  'heredoc' => $heredoc,
29  );
30
31
32foreach ( $variation_array as $var ) {
33  var_dump(proc_nice( $var  ) );
34}
35?>
36--EXPECTF--
37*** Test substituting argument 1 with string values ***
38
39Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d
40bool(false)
41
42Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d
43bool(false)
44
45Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d
46bool(false)
47
48Warning: proc_nice() expects parameter 1 to be int, string given in %s on line %d
49bool(false)
50