示例#1
0
 /**
  * @param Package $package
  * @return array
  */
 public function getChecksumsForExtension(Package $package)
 {
     $_EXTKEY = $package->getPackageKey();
     $configurationFile = $package->getPackagePath() . 'ext_emconf.php';
     $EM_CONF = null;
     if (file_exists($configurationFile)) {
         include $configurationFile;
         if (!empty($EM_CONF[$_EXTKEY]['_md5_values_when_last_written'])) {
             return unserialize($EM_CONF[$_EXTKEY]['_md5_values_when_last_written']);
         }
     }
     return array();
 }
示例#2
0
 /**
  * @test
  */
 public function getClassesPathReturnsPathToClasses()
 {
     $packageManagerMock = $this->getMock(\TYPO3\CMS\Core\Package\PackageManager::class);
     $packageManagerMock->expects($this->any())->method('isPackageKeyValid')->willReturn(TRUE);
     $package = new Package($packageManagerMock, 'core', PATH_typo3 . 'sysext/core/');
     $packageClassesPath = $package->getClassesPath();
     $expected = $package->getPackagePath() . Package::DIRECTORY_CLASSES;
     $this->assertEquals($expected, $packageClassesPath);
 }
 /**
  * @param Package $package
  * @return array
  */
 public function fetchExtensionInformation(Package $package)
 {
     return array('timestamp' => time(), 'checksums' => $this->checksumGenerator->getChecksumsForPath($package->getPackagePath(), static::$vcsPatterns));
 }