Skip to content

Commit

Permalink
Add test for heic
Browse files Browse the repository at this point in the history
  • Loading branch information
ariselseng committed Aug 1, 2022
1 parent 7b2da1d commit 04f3e43
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions tests/RawPreviewIProviderV2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,34 +15,39 @@ class RawPreviewTestIProviderV2 extends TestCase
protected $userFolder;
const ASSETS = [
[
'url' => '/data/Nikon/D600/DSC_3297.NEF',
'url' => 'https://raw.pixls.us/data/Nikon/D600/DSC_3297.NEF',
'filename' => 'Фото".NEF',
'sha1' => '607599813cc5ea65e81595e07955a51f281bf0b7'
],
[
'url' => '/data/Canon/EOS 50D/IMG_9518.CR2',
'url' => 'https://raw.pixls.us/data/Canon/EOS 50D/IMG_9518.CR2',
'filename' => 'Canon_EOS_50D.CR2',
'sha1' => 'eea0eaa8bf907d483b6234eab001fdc85848c80b'
],
[
'url' => '/data/Adobe DNG Converter/Canon EOS 5D Mark III/5G4A9395-compressed-lossless.DNG',
'url' => 'https://raw.pixls.us/data/Adobe DNG Converter/Canon EOS 5D Mark III/5G4A9395-compressed-lossless.DNG',
'filename' => 'Canon_EOS_5D_Mark_III.compressed-lossless.DNG',
'sha1' => 'a18d4dae67cfc0a9673c01b2d4f14fab4be68580'
],
[
'url' => '/data/Canon/EOS D2000C/RAW_CANON_D2000.TIF',
'url' => 'https://raw.pixls.us/data/Canon/EOS D2000C/RAW_CANON_D2000.TIF',
'filename' => 'Canon_EOS_2000C.TIF',
'sha1' => 'b68b5c7d4b944fff0ad9d28e68f405f957429c49'
],
[
'url' => '/data/Fujifilm/X-A1/DSCF2482.RAF',
'url' => 'https://raw.pixls.us/data/Fujifilm/X-A1/DSCF2482.RAF',
'filename' => 'Fujifilm_X-A1_DSCF2482.RAF',
'sha1' => '82e625be5689bbd08a08dd9a9c5d38e21c80bf33'
],
[
'url' => '/data/Hasselblad/CF132/RAW_HASSELBLAD_IXPRESS_CF132.3FR',
'url' => 'https://raw.pixls.us/data/Hasselblad/CF132/RAW_HASSELBLAD_IXPRESS_CF132.3FR',
'filename' => 'Hasselblad_CF132.3FR',
'sha1' => 'bcaa4c329711a8effb59682a99df3f2b15009d87'
],
[
'url' => 'https://filesamples.com/samples/image/heic/sample1.heic',
'filename' => 'sample1.heic',
'sha1' => 'ff0ed3774c4f905357c7918a5dfbeb54ab04f3d7'
]
];

Expand All @@ -56,7 +61,7 @@ static function setupBeforeClass(): void
continue;
}

$content = file_get_contents('https://raw.pixls.us/' . str_replace(' ', '%20', $test['url']));
$content = file_get_contents(str_replace(' ', '%20', $test['url']));
if ($content !== false && sha1($content) === $test['sha1']) {
file_put_contents(sys_get_temp_dir() . '/' . $test['filename'], $content);
}
Expand Down

0 comments on commit 04f3e43

Please sign in to comment.