Esempio n. 1
0
 /**
  * @param SplFileInfo $file
  * @return bool
  */
 private function load(SplFileInfo $file)
 {
     try {
         $this->exifData = $this->exif->read($file->getRealPath());
         $this->date = $this->exifData->getCreationDate();
     } catch (\RuntimeException $e) {
         // do nothing
     }
 }
Esempio n. 2
0
 /**
  * @group reader
  * @covers \PHPExif\Reader\Reader::read
  */
 public function testGetExifPassedToAdapter()
 {
     $adapter = $this->getMock('\\PHPExif\\Adapter\\AdapterInterface');
     $adapter->expects($this->once())->method('getExifFromFile');
     $reflProperty = new \ReflectionProperty('\\PHPExif\\Reader\\Reader', 'adapter');
     $reflProperty->setAccessible(true);
     $reflProperty->setValue($this->reader, $adapter);
     $this->reader->read('/tmp/foo.bar');
 }