进行了一些小修复
This commit is contained in:
1 parent
7c0c21e984
commit
ee4e599f2d
13 files changed
+496
-75
No files matched your search
@@ -86,6 +86,26 @@ final class FrontSubmitPayTest extends TestCase {
|
||||
self::assertSame('0.00', $meta['vip2_price']);
|
||||
}
|
||||
|
||||
public function test_download_resource_modal_fields_are_sanitized_as_one_payload(): void {
|
||||
$downloads = DomainModel::sanitize_downloads([
|
||||
[
|
||||
'url' => 'https://example.com/file.zip',
|
||||
'label' => '<b>镜像下载</b>',
|
||||
'extract_code' => ' 提取码:1234 ',
|
||||
'copy_key' => '<i>提取码</i>',
|
||||
'copy_val' => ' 1234 ',
|
||||
'class' => 'jb-blue',
|
||||
],
|
||||
]);
|
||||
|
||||
self::assertCount(1, $downloads);
|
||||
self::assertSame('镜像下载', $downloads[0]['label']);
|
||||
self::assertSame('提取码:1234', $downloads[0]['extract_code']);
|
||||
self::assertSame('提取码', $downloads[0]['copy_key']);
|
||||
self::assertSame('1234', $downloads[0]['copy_val']);
|
||||
self::assertSame('jb-blue', $downloads[0]['class']);
|
||||
}
|
||||
|
||||
private function settings(bool $vip1_enabled, bool $vip2_enabled): array {
|
||||
return [
|
||||
'pay_free_s' => true,
|
||||
|
||||
Reference in new issue
Block a user