public function testFreadError() { $this->setExpectedException('RuntimeException', 'Error reading from file fail:'); $fileObject = new FileObject('fail://', 'r'); $fileObject->fread(10); }