sony.phpt 572 B

1234567891011121314151617181920212223
  1. --TEST--
  2. Sony test
  3. --EXTENSIONS--
  4. exif
  5. --FILE--
  6. <?php
  7. $data = exif_read_data(__DIR__ . DIRECTORY_SEPARATOR . 'sony.jpg');
  8. if (!$data) {
  9. exit('Error: Unable to parse EXIF data');
  10. }
  11. // Perhaps we should just test for SonyModelID since it seems to be
  12. // the most specific tag name that should be found in any Sony generated
  13. // picture
  14. foreach (['SonyModelID', 'Panorama', 'AntiBlur'] as $sony_tag) {
  15. printf('%s was %sfound' . PHP_EOL, $sony_tag, (!isset($data[$sony_tag]) ? 'NOT ' : ''));
  16. }
  17. ?>
  18. --EXPECT--
  19. SonyModelID was found
  20. Panorama was found
  21. AntiBlur was found