1
0
mirror of https://github.com/php/php-src.git synced 2026-04-21 06:51:18 +02:00
Files
archived-php-src/ext/exif/tests/sony.phpt
2018-10-14 19:46:15 +02:00

24 lines
639 B
PHP

--TEST--
Sony test
--SKIPIF--
<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
--FILE--
<?php
$data = exif_read_data(__DIR__ . DIRECTORY_SEPARATOR . 'sony.jpg');
if (!$data) {
exit('Error: Unable to parse EXIF data');
}
// Perhaps we should just test for SonyModelID since it seems to be
// the most specific tag name that should be found in any Sony generated
// picture
foreach (['SonyModelID', 'Panorama', 'AntiBlur'] as $sony_tag) {
printf('%s was %sfound' . PHP_EOL, $sony_tag, (!isset($data[$sony_tag]) ? 'NOT ' : ''));
}
?>
--EXPECT--
SonyModelID was found
Panorama was found
AntiBlur was found