public function testDelete() { $id = $this->gridFs->storeBytes('somebinarydata'); $file = $this->gridFs->getFileById($id); $file->delete(); $this->assertNull($this->gridFs->getFileById($id)); }