This commit is contained in:
crazywhalecc 2024-10-05 10:56:15 +08:00 committed by Jerry Ma
parent 648c43cc7f
commit 566f6980ca

View File

@ -104,7 +104,7 @@ class DownloaderTest extends TestCase
{ {
$filelist = Downloader::getFromFileList('fake-filelist', [ $filelist = Downloader::getFromFileList('fake-filelist', [
'url' => 'https://fakecmd.com/filelist', 'url' => 'https://fakecmd.com/filelist',
'regex' => '/href="(?<file>filelist-(?<version>[^"]+)\\.tar\\.xz)"/', 'regex' => '/href="(?<file>filelist-(?<version>[^"]+)\.tar\.xz)"/',
]); ]);
$this->assertIsArray($filelist); $this->assertIsArray($filelist);
$this->assertEquals('filelist-4.7.0.tar.xz', $filelist[1]); $this->assertEquals('filelist-4.7.0.tar.xz', $filelist[1]);