mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
36 lines
875 B
PHP
Executable File
36 lines
875 B
PHP
Executable File
--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--
|