示例#1
0
文件: checker.php 项目: evanjt/core
 /**
  * Verify the core code of the instance as well as all applicable applications
  * and store the results.
  */
 public function runInstanceVerification()
 {
     $this->verifyCoreSignature();
     $appIds = $this->appLocator->getAllApps();
     foreach ($appIds as $appId) {
         // If an application is shipped a valid signature is required
         $isShipped = $this->appManager->isShipped($appId);
         $appNeedsToBeChecked = false;
         if ($isShipped) {
             $appNeedsToBeChecked = true;
         } elseif ($this->fileAccessHelper->file_exists($this->appLocator->getAppPath($appId) . '/appinfo/signature.json')) {
             // Otherwise only if the application explicitly ships a signature.json file
             $appNeedsToBeChecked = true;
         }
         if ($appNeedsToBeChecked) {
             $this->verifyAppSignature($appId);
         }
     }
 }
示例#2
0
 /**
  * @expectedException \Exception
  * @expectedExceptionMessage App not found
  */
 public function testGetAppPathNotExistentApp()
 {
     $this->locator->getAppPath('aTotallyNotExistingApp');
 }