Skip to content

Commit eadfdb9

Browse files
galvaopetk
authored andcommitted
Add test case for pcntl_setpriority basic behaviour
1 parent e727fac commit eadfdb9

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
--TEST--
2+
pcntl_setpriority() - Basic behaviour
3+
--CREDITS--
4+
Er Galvão Abbott [email protected]
5+
# TestFest 2017 PHPRS PHP UG 2017-10-31
6+
--SKIPIF--
7+
<?php
8+
if (!isset($_SERVER['SUDO_USER'])) {
9+
die('skip - this functions needs to run with superuser');
10+
}
11+
12+
if (!extension_loaded('pcntl')) {
13+
die('skip - ext/pcntl not loaded');
14+
} else if (!function_exists('pcntl_setpriority')) {
15+
die('skip - pcntl_setpriority doesn\'t exist');
16+
}
17+
?>
18+
--FILE--
19+
<?php
20+
var_dump(pcntl_setpriority(-5));
21+
?>
22+
--EXPECT--
23+
bool(true)

0 commit comments

Comments
 (0)