ext-uv/tests/320-fs-sendfile.phpt

15 lines
410 B
Plaintext
Raw Normal View History

--TEST--
Check for fs_send_file
--FILE--
<?php
define("FIXTURE_PATH", dirname(__FILE__) . "/fixtures/hello.data");
2015-01-18 02:58:40 +01:00
uv_fs_open(uv_default_loop(), FIXTURE_PATH, UV::O_RDONLY, 0, function($read_fd) {
2015-01-21 17:04:49 +01:00
$std_err = STDOUT; // phpt doesn't catch stdout as uv_fs_sendfile uses stdout directly.
2015-01-18 02:58:40 +01:00
uv_fs_sendfile(uv_default_loop(), $std_err, $read_fd, 0, 6, function($result) { });
});
uv_run();
--EXPECT--
2015-01-18 02:58:40 +01:00
Hello