You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
755 B
PHTML

5 years ago
<?php
namespace CubiStore\Tests\Web\Utils;
use CubiStore\Web\Utils\ApkSignUtils;
use PHPUnit\Framework\TestCase;
class ApkSignUtilsTest extends TestCase
{
function testCorruptedZip64() {
$this->expectException(\RuntimeException::class);
$this->expectExceptionMessage("Corrupted ZIP, ZIP64 offset and normal offset don't match up.");
$utils = new ApkSignUtils();
$utils->findSignature(__DIR__ . '/../../var/testdata/signedapks/zip64corrupted.jar');
}
5 years ago
function testSha1Signature()
{
$utils = new ApkSignUtils();
$apkSignature = $utils->findSignature(__DIR__ . '/../../var/testdata/signedapks/sha1.apk');
$this->assertNotNull($apkSignature, "Couldn't find APK signature");
5 years ago
}
}