Skip to content

QA - pcntl_getpriority_error.phpt - fix test context information and case #8993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ext/pcntl/tests/pcntl_getpriority_error.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
pcntl_getpriority() - Wrong process identifier
pcntl_getpriority() - Wrong mode passed and also for non existing process id provided
--EXTENSIONS--
pcntl
--SKIPIF--
Expand All @@ -13,11 +13,15 @@ if (!function_exists('pcntl_getpriority')) {
<?php

try {
pcntl_getpriority(null, 42);
pcntl_getpriority(null, (PRIO_PGRP - PRIO_USER - PRIO_PROCESS));
} catch (ValueError $exception) {
echo $exception->getMessage() . "\n";
}

pcntl_getpriority(-123);

?>
--EXPECT--
--EXPECTF--
pcntl_getpriority(): Argument #2 ($mode) must be one of PRIO_PGRP, PRIO_USER, or PRIO_PROCESS

Warning: pcntl_getpriority(): Error 3: No process was located using the given parameters in %s