1
0
mirror of https://github.com/php/php-src.git synced 2026-04-25 08:58:28 +02:00
Files
archived-php-src/ext/pcntl/tests/pcntl_setpriority_error.phpt
T
Máté Kocsis 3df306de94 Promote warnings to exceptions in ext/pcntl
Closes GH-6004
2020-08-25 13:02:13 +02:00

24 lines
506 B
PHP

--TEST--
pcntl_setpriority() - Wrong process identifier
--SKIPIF--
<?php
if (!extension_loaded('pcntl')) {
die('skip ext/pcntl not loaded');
}
if (!function_exists('pcntl_setpriority')) {
die('skip pcntl_setpriority doesn\'t exist');
}
?>
--FILE--
<?php
try {
pcntl_setpriority(0, null, 42);
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}
?>
--EXPECT--
pcntl_setpriority(): Argument #3 ($process_identifier) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS