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