saveToFile($estimator, $filepath); $restored = $modelManager->restoreFromFile($filepath); self::assertEquals($estimator, $restored); } public function testRestoreWrongFile(): void { $this->expectException(FileException::class); $filepath = sys_get_temp_dir().DIRECTORY_SEPARATOR.'unexisting'; $modelManager = new ModelManager(); $modelManager->restoreFromFile($filepath); } }