Skip to content

Commit e99ea84

Browse files
committed
Test tweaks
1 parent f92fa89 commit e99ea84

9 files changed

+0
-112
lines changed

ext/posix/tests/posix_getcwd.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ if (!function_exists('posix_getcwd')) die('skip posix_getcwd() not found');
99
<?php
1010

1111
var_dump(posix_getcwd());
12-
var_dump(posix_getcwd(1));
1312

1413
?>
1514
--EXPECTF--
1615
string(%d) "%s"
17-
18-
Warning: posix_getcwd() expects exactly 0 parameters, 1 given in %s on line %d
19-
NULL

ext/posix/tests/posix_getgrgid_error.phpt

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,6 @@ Test posix_getgrgid() function : error conditions
1414

1515
echo "*** Testing posix_getgrgid() : error conditions ***\n";
1616

17-
// Zero arguments
18-
echo "\n-- Testing posix_getgrgid() function with Zero arguments --\n";
19-
var_dump( posix_getgrgid() );
20-
21-
//Test posix_getgrgid with one more than the expected number of arguments
22-
echo "\n-- Testing posix_getgrgid() function with more than expected no. of arguments --\n";
23-
24-
$extra_arg = 10;
25-
$gid = 0;
26-
var_dump( posix_getgrgid($gid, $extra_arg) );
27-
2817
echo "\n-- Testing posix_getgrgid() function with a negative group id --\n";
2918
$gid = -999;
3019
var_dump( posix_getgrgid($gid));
@@ -34,16 +23,6 @@ echo "Done";
3423
--EXPECTF--
3524
*** Testing posix_getgrgid() : error conditions ***
3625

37-
-- Testing posix_getgrgid() function with Zero arguments --
38-
39-
Warning: posix_getgrgid() expects exactly 1 parameter, 0 given in %s on line %d
40-
bool(false)
41-
42-
-- Testing posix_getgrgid() function with more than expected no. of arguments --
43-
44-
Warning: posix_getgrgid() expects exactly 1 parameter, 2 given in %s on line %d
45-
bool(false)
46-
4726
-- Testing posix_getgrgid() function with a negative group id --
4827
bool(false)
4928
Done

ext/posix/tests/posix_getpgid_error.phpt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,6 @@ if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) {
1616

1717
echo "*** Testing posix_getpgid() : error conditions ***\n";
1818

19-
echo "\n-- Testing posix_getpgid() function no arguments --\n";
20-
var_dump( posix_getpgid() );
21-
22-
echo "\n-- Testing posix_getpgid() with one extra argument --\n";
23-
$pid = 10;
24-
$extra_arg = 20;
25-
var_dump( posix_getpgid($pid, $extra_arg) );
26-
2719
echo "\n-- Testing posix_getpgid() with negative pid --\n";
2820
$pid = -99;
2921
var_dump( posix_getpgid($pid) );
@@ -33,16 +25,6 @@ echo "Done";
3325
--EXPECTF--
3426
*** Testing posix_getpgid() : error conditions ***
3527

36-
-- Testing posix_getpgid() function no arguments --
37-
38-
Warning: posix_getpgid() expects exactly 1 parameter, 0 given in %s on line %d
39-
bool(false)
40-
41-
-- Testing posix_getpgid() with one extra argument --
42-
43-
Warning: posix_getpgid() expects exactly 1 parameter, 2 given in %s on line %d
44-
bool(false)
45-
4628
-- Testing posix_getpgid() with negative pid --
4729
bool(false)
4830
Done

ext/posix/tests/posix_getpwuid_error.phpt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ Test posix_getpwuid() function : error conditions
1414

1515
echo "*** Testing posix_getpwuid() : error conditions ***\n";
1616

17-
echo "\n-- Testing posix_getpwuid() function with Zero arguments --\n";
18-
var_dump( posix_getpwuid() );
19-
20-
echo "\n-- Testing posix_getpwuid() function with more than expected no. of arguments --\n";
21-
$uid = posix_getuid();
22-
$extra_arg = 10;
23-
var_dump( posix_getpwuid($uid, $extra_arg) );
24-
2517
echo "\n-- Testing posix_getpwuid() function negative uid --\n";
2618
$uid = -99;
2719
var_dump( posix_getpwuid($uid) );
@@ -31,16 +23,6 @@ echo "Done";
3123
--EXPECTF--
3224
*** Testing posix_getpwuid() : error conditions ***
3325

34-
-- Testing posix_getpwuid() function with Zero arguments --
35-
36-
Warning: posix_getpwuid() expects exactly 1 parameter, 0 given in %s on line %d
37-
bool(false)
38-
39-
-- Testing posix_getpwuid() function with more than expected no. of arguments --
40-
41-
Warning: posix_getpwuid() expects exactly 1 parameter, 2 given in %s on line %d
42-
bool(false)
43-
4426
-- Testing posix_getpwuid() function negative uid --
4527
bool(false)
4628
Done

ext/posix/tests/posix_getsid_error.phpt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,9 @@ PHP Testfest Berlin 2009-05-10
1313
?>
1414
--FILE--
1515
<?php
16-
var_dump( posix_getsid() );
17-
var_dump( posix_getsid(array()) );
1816
var_dump( posix_getsid(-1) );
1917
?>
2018
===DONE===
2119
--EXPECTF--
22-
Warning: posix_getsid() expects exactly 1 parameter, 0 given in %s on line %d
23-
bool(false)
24-
25-
Warning: posix_getsid() expects parameter 1 to be int, array given in %s on line %d
26-
bool(false)
2720
bool(false)
2821
===DONE===

ext/posix/tests/posix_initgroups.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ if (!function_exists('posix_initgroups')) die('skip posix_initgroups() not found
88
--FILE--
99
<?php
1010

11-
var_dump(posix_initgroups('foo', 'bar'));
1211
var_dump(posix_initgroups(NULL, NULL));
1312

1413
?>
1514
--EXPECTF--
16-
Warning: posix_initgroups() expects parameter 2 to be int, string given in %s on line %d
17-
bool(false)
1815
bool(false)

ext/posix/tests/posix_kill_error.phpt

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,6 @@ Test posix_kill() function : error conditions
1616
echo "*** Testing posix_kill() : error conditions ***\n";
1717

1818

19-
echo "\n-- Testing posix_kill() function with more than expected no. of arguments --\n";
20-
$pid = posix_getpid();
21-
$sig = 9;
22-
$extra_arg = 10;
23-
var_dump( posix_kill($pid, $sig, $extra_arg) );
24-
25-
echo "\n-- Testing posix_kill() function with less than expected no. of arguments --\n";
26-
$pid = posix_getpid();
27-
var_dump( posix_kill($pid) );
28-
2919
echo "\n-- Testing posix_kill() function with invalid signal --\n";
3020
$pid = posix_getpid();
3121
$sig = 999;
@@ -41,16 +31,6 @@ echo "Done";
4131
--EXPECTF--
4232
*** Testing posix_kill() : error conditions ***
4333

44-
-- Testing posix_kill() function with more than expected no. of arguments --
45-
46-
Warning: posix_kill() expects exactly 2 parameters, 3 given in %s on line %d
47-
bool(false)
48-
49-
-- Testing posix_kill() function with less than expected no. of arguments --
50-
51-
Warning: posix_kill() expects exactly 2 parameters, 1 given in %s on line %d
52-
bool(false)
53-
5434
-- Testing posix_kill() function with invalid signal --
5535
bool(false)
5636

ext/posix/tests/posix_strerror_error.phpt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,6 @@ Test posix_strerror() function : error conditions
1414

1515
echo "*** Testing posix_strerror() : error conditions ***\n";
1616

17-
echo "\n-- Testing posix_strerror() function with Zero arguments --\n";
18-
var_dump( posix_strerror() );
19-
20-
echo "\n-- Testing posix_strerror() function with more than expected no. of arguments --\n";
21-
$errno = posix_get_last_error();
22-
$extra_arg = 10;
23-
var_dump( posix_strerror($errno, $extra_arg) );
24-
2517
echo "\n-- Testing posix_strerror() function with invalid error number --\n";
2618
$errno = -999;
2719
echo gettype( posix_strerror($errno) )."\n";
@@ -31,16 +23,6 @@ echo "Done";
3123
--EXPECTF--
3224
*** Testing posix_strerror() : error conditions ***
3325

34-
-- Testing posix_strerror() function with Zero arguments --
35-
36-
Warning: posix_strerror() expects exactly 1 parameter, 0 given in %s on line %d
37-
bool(false)
38-
39-
-- Testing posix_strerror() function with more than expected no. of arguments --
40-
41-
Warning: posix_strerror() expects exactly 1 parameter, 2 given in %s on line %d
42-
bool(false)
43-
4426
-- Testing posix_strerror() function with invalid error number --
4527
string
4628
Done

ext/posix/tests/posix_ttyname_error_wrongparams.phpt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,11 @@ PHP Testfest Berlin 2009-05-10
2020
?>
2121
--FILE--
2222
<?php
23-
var_dump(posix_ttyname()); // param missing
2423
var_dump(posix_ttyname(0)); // param not a ressource
2524
var_dump(posix_ttyname(imagecreate(1, 1))); // wrong resource type
2625
?>
2726
===DONE===
2827
--EXPECTF--
29-
Warning: posix_ttyname() expects exactly 1 parameter, 0 given in %s on line %d
30-
bool(false)
3128
bool(false)
3229

3330
Warning: posix_ttyname(): supplied resource is not a valid stream resource in %s on line %d

0 commit comments

Comments
 (0)