public function testProxiesToFunction() { $stream = new FnStream(['read' => function ($len) { $this->assertEquals(3, $len); return 'foo'; }]); $this->assertEquals('foo', $stream->read(3)); }