xref: /PHP-7.2/ext/exif/tests/sony.phpt (revision 17ccbeec)
1--TEST--
2Sony test
3--SKIPIF--
4<?php if (!extension_loaded('exif')) print 'skip exif extension not available';?>
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