mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-27 04:24:45 +01:00
36 lines
875 B
Plaintext
36 lines
875 B
Plaintext
|
--TEST--
|
||
|
Check for uv_cpu_info
|
||
|
--FILE--
|
||
|
<?php
|
||
|
$cpuinfo = uv_cpu_info();
|
||
|
|
||
|
$info = array_shift($cpuinfo);
|
||
|
|
||
|
if (!isset($info["model"])) {
|
||
|
echo "FAILED: key `model` does not exist" . PHP_EOL;
|
||
|
}
|
||
|
if (!isset($info["speed"])) {
|
||
|
echo "FAILED: key `speed` does not exist" . PHP_EOL;
|
||
|
}
|
||
|
if (!isset($info["times"])) {
|
||
|
echo "FAILED: key `times` does not exist" . PHP_EOL;
|
||
|
}
|
||
|
|
||
|
if (!isset($info["times"]["sys"])) {
|
||
|
echo "FAILED: key `times.sys` does not exist" . PHP_EOL;
|
||
|
}
|
||
|
if (!isset($info["times"]["user"])) {
|
||
|
echo "FAILED: key `times.user` does not exist" . PHP_EOL;
|
||
|
}
|
||
|
if (!isset($info["times"]["idle"])) {
|
||
|
echo "FAILED: key `times.idle` does not exist" . PHP_EOL;
|
||
|
}
|
||
|
if (!isset($info["times"]["irq"])) {
|
||
|
echo "FAILED: key `times.irq` does not exist" . PHP_EOL;
|
||
|
}
|
||
|
if (!isset($info["times"]["nice"])) {
|
||
|
echo "FAILED: key `times.nice` does not exist" . PHP_EOL;
|
||
|
}
|
||
|
|
||
|
--EXPECT--
|