public function testSaveRootPackageFile()
 {
     $baseConfig = new Config();
     $packageFile = new RootPackageFile(null, '/path', $baseConfig);
     $this->writer->expects($this->once())->method('writePackageFile')->with($packageFile, '/path');
     $this->storage->saveRootPackageFile($packageFile);
 }
 /**
  * Saves a root package file.
  *
  * The package file is saved to the same path that it was read from.
  *
  * @param RootPackageFile $packageFile The package file to save.
  *
  * @throws IOException If the file cannot be written.
  */
 public function saveRootPackageFile(RootPackageFile $packageFile)
 {
     $this->writer->writePackageFile($packageFile, $packageFile->getPath());
     if ($this->factoryManager) {
         $this->factoryManager->autoGenerateFactoryClass();
     }
 }