public function testWriteException() { $handle = fopen('php://temp', 'w+'); $stream = new Stream($handle); $stream->write('', 2); }