/** * Verify the signature of core. Returns an array with the following content: * [ * 'FILE_MISSING' => * [ * 'filename' => [ * 'expected' => 'expectedSHA512', * 'current' => 'currentSHA512', * ], * ], * 'EXTRA_FILE' => * [ * 'filename' => [ * 'expected' => 'expectedSHA512', * 'current' => 'currentSHA512', * ], * ], * 'INVALID_HASH' => * [ * 'filename' => [ * 'expected' => 'expectedSHA512', * 'current' => 'currentSHA512', * ], * ], * ] * * Array may be empty in case no problems have been found. * * @return array */ public function verifyCoreSignature() { try { $result = $this->verify($this->environmentHelper->getServerRoot() . '/core/signature.json', $this->environmentHelper->getServerRoot(), 'core'); } catch (\Exception $e) { $result = ['EXCEPTION' => ['class' => get_class($e), 'message' => $e->getMessage()]]; } $this->storeResults('core', $result); return $result; }
public function testGetServerRoot() { $this->assertSame(\OC::$SERVERROOT, $this->environmentHelper->getServerRoot()); }
public function testGetServerRoot() { $factory = new EnvironmentHelper(); $this->assertSame(\OC::$SERVERROOT, $factory->getServerRoot()); }