/**
  * @group adapter
  * @covers \PHPExif\Adapter\AdapterAbstract::setOptions
  */
 public function testSetOptionsIgnoresPropertiesWithoutSetters()
 {
     $expected = array('iptcMapping' => array('foo', 'bar', 'baz'));
     $this->adapter->setOptions($expected);
     foreach ($expected as $key => $value) {
         $reflProp = new \ReflectionProperty('\\PHPExif\\Adapter\\Native', $key);
         $reflProp->setAccessible(true);
         $this->assertNotEquals($value, $reflProp->getValue($this->adapter));
     }
 }
Exemple #2
0
 /**
  * @group exiftool
  * @covers \PHPExif\Adapter\Exiftool::getExifFromFile
  */
 public function testGetExifFromFileWithUtf8()
 {
     $file = PHPEXIF_TEST_ROOT . '/files/utf8.jpg';
     $this->adapter->setOptions(array('encoding' => array('iptc' => 'utf8')));
     $result = $this->adapter->getExifFromFile($file);
     $this->assertInstanceOf('\\PHPExif\\Exif', $result);
     $this->assertInternalType('array', $result->getRawData());
     $this->assertNotEmpty($result->getRawData());
 }