5 include __DIR__
."/../../../setup.inc";
7 class IOTest
extends \PHPUnit_Framework_TestCase
{
11 $this->ticker
= new Ticker
;
15 $gzip = new IO\
Process("gzip -1");
16 $base = new IO\
Process("base64");
17 $func = new IO\
Filter(function($f, $data, $eof) {
21 fwrite($gzip->getInput(), "Hello World!\n");
22 fclose($gzip->getInput());
25 $ticker->pipe($gzip, $base, $func, "fpassthru");
29 $this->assertStringMatchesFormat("\nAAAAN0HFd3NACQeUJp8LPjwVJnczIN/AEI%sAIs4H", ob_get_contents());