Esempio n. 1
0
 /**
  * Update all files in the Contao installation.
  *
  * The installed files are:
  * 1. sources.
  * 2. user files.
  * 3. root files.
  *
  * @param PackageInterface $package The package being processed.
  *
  * @return void
  */
 public function updateContaoFiles(PackageInterface $package)
 {
     $map = $this->mapSources($package);
     $this->updateSources($map, $package);
     $this->updateUserfiles($package);
     $this->updateRootFiles($package);
     $root = $this->plugin->getContaoRoot($this->composer->getPackage()) . DIRECTORY_SEPARATOR;
     $installPath = self::unprefixPath($root, $this->getInstallPath($package));
     RunonceManager::addRunonces($package, $installPath);
 }
Esempio n. 2
0
 public function testDoNotAddInstalledRunOnce3()
 {
     RunonceManager::clearRunonces();
     $package = new CompletePackage('test/package', '1.0.0.0', '1.0.0');
     $package->setExtra(array('contao' => array('sources' => array('test' => 'system/modules/test'), 'runonce' => array('system/runonce.php'))));
     $package->setTargetDir('Some/Namespace');
     RunonceManager::addRunonces($package, $this->rootDir);
     $this->assertEquals(array(), RunonceManager::getRunonces(), 'Installed runonce has been added.');
     $this->assertEmpty(RunonceManager::getRunonces(), 'Installed runonce has been added.');
 }