public function testTicks() { $file = fopen(__FILE__, "r"); stream_set_blocking($file, false); $read = 0; declare (ticks=1); $this->ticker->register(); $this->ticker->read($file, function ($file) use(&$read) { do { $data = fread($file, 4096); $read += strlen($data); } while (strlen($data)); return feof($file); }); $dummy = "This test is do tiny, "; $dummy .= "we don't have to do much."; $this->assertEquals(filesize(__FILE__), $read); }