xref: /php-uv/tests/320-fs-sendfile.phpt (revision 7bc81359)
1--TEST--
2Check for fs_send_file
3--FILE--
4<?php
5define("FIXTURE_PATH", dirname(__FILE__) . "/fixtures/hello.data");
6
7uv_fs_open(uv_default_loop(), FIXTURE_PATH, UV::O_RDONLY, 0, function($read_fd) {
8    $std_err = STDOUT; // phpt doesn't catch stdout as uv_fs_sendfile uses stdout directly.
9    uv_fs_sendfile(uv_default_loop(), $std_err, $read_fd, 0, 6, function($result) { });
10});
11
12uv_run();
13--EXPECT--
14Hello
15