示例#1
0
 public function testGetFileSha1Mismatch()
 {
     $file = $this->createFile();
     file_put_contents($file, 'test');
     $this->setPropertyValue($this->update, 'publicKey', null);
     $this->setPropertyValue($this->update, 'url', $file);
     $this->setExpectedException('Herrera\\Phar\\Update\\Exception\\FileException', 'Mismatch of the SHA1 checksum (1234567890123456789012345678901234567890) of the downloaded file (' . sha1_file($file) . ').');
     $this->update->getFile();
 }