Add new tests, remove redundant code

This commit is contained in:
crazywhalecc
2024-10-03 14:52:46 +08:00
committed by Jerry Ma
parent c800e3b93a
commit 732fa06abb
14 changed files with 2021 additions and 1050 deletions

View File

@@ -0,0 +1,46 @@
<?php
declare(strict_types=1);
namespace SPC\Tests\store;
use PHPUnit\Framework\TestCase;
use SPC\store\Downloader;
/**
* @internal
* TODO: Test all methods
*/
class DownloaderTest extends TestCase
{
public function testGetLatestGithubTarball()
{
$this->assertEquals(
'https://api.github.com/repos/AOMediaCodec/libavif/tarball/v1.1.1',
Downloader::getLatestGithubTarball('libavif', [
'type' => 'ghtar',
'repo' => 'AOMediaCodec/libavif',
])[0]
);
}
public function testDownloadGit() {}
public function testDownloadFile() {}
public function testLockSource() {}
public function testGetLatestBitbucketTag() {}
public function testGetLatestGithubRelease() {}
public function testCurlExec() {}
public function testCurlDown() {}
public function testDownloadSource() {}
public function testGetFromFileList() {}
public function testDownloadPackage() {}
}