mirror of
https://github.com/danog/ext-uv.git
synced 2024-11-26 20:14:47 +01:00
20 lines
550 B
PHP
20 lines
550 B
PHP
--TEST--
|
|
Check for fs read and close
|
|
--FILE--
|
|
<?php
|
|
define("FIXTURE_PATH", dirname(__FILE__) . "/fixtures/hello.data");
|
|
|
|
uv_fs_open(uv_default_loop(), FIXTURE_PATH, UV::O_RDONLY, 0, function($r){
|
|
uv_fs_read(uv_default_loop(), $r, 0, 32, function($stream, $nread, $data) {
|
|
uv_fs_close(uv_default_loop(), 42, function($result) {
|
|
if($result != 42) {
|
|
echo "OK";
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
uv_run();
|
|
--EXPECTF--
|
|
Warning: uv_fs_close() expects parameter 2 to be resource, integer given in %s on line %d
|