summaryrefslogtreecommitdiff
path: root/ext/standard/tests/time/bug60222.phpt
blob: c74d27d53bc58a40abd4c044f02405ddd51aa00c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--TEST--
Bug #60222 (time_nanosleep() does validate input params)
--FILE--
<?php
    try {
        time_nanosleep(-1, 0);
    } catch (ValueError $exception) {
        echo $exception->getMessage() . "\n";
    }

    try {
        time_nanosleep(0, -1);
    } catch (ValueError $exception) {
        echo $exception->getMessage() . "\n";
    }
?>
--EXPECTF--
The seconds value must be greater than 0
The nanoseconds value must be greater than 0