Skip to content

Commit a9e1327

Browse files
committed
Fix phpunit mock data
1 parent 93a227b commit a9e1327

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/mock/SPC_store.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@
1212
function f_exec(string $command, mixed &$output, mixed &$result_code): bool
1313
{
1414
$result_code = 0;
15+
if (str_contains($command, 'https://api.github.com/repos/AOMediaCodec/libavif/releases/latest')) {
16+
$output = explode("\n", json_encode([
17+
'tag_name' => 'v1.1.1',
18+
'tarball_url' => 'https://api.github.com/repos/AOMediaCodec/libavif/tarball/v1.1.1',
19+
'prerelease' => false,
20+
'draft' => false,
21+
]));
22+
return true;
23+
}
1524
if (str_contains($command, 'https://api.github.com/repos/AOMediaCodec/libavif/releases')) {
1625
$output = explode("\n", gzdecode(file_get_contents(__DIR__ . '/../assets/github_api_AOMediaCodec_libavif_releases.json.gz')));
1726
return true;

0 commit comments

Comments
 (0)