/**
  * 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 StorageException If the file cannot be written.
  */
 public function saveRootPackageFile(RootPackageFile $packageFile)
 {
     $serialized = $this->serializer->serializeRootPackageFile($packageFile);
     $this->storage->write($packageFile->getPath(), $serialized);
     if ($this->factoryManager) {
         $this->factoryManager->autoGenerateFactoryClass();
     }
 }
Example #2
0
 public function testExists()
 {
     $this->assertTrue($this->storage->exists($this->path));
     unlink($this->path);
     $this->assertFalse($this->storage->exists($this->path));
 }