/**
  * Test the resolve path method throws exception
  * when an invaid field name is specified.
  *
  * @expectedException \InvalidArgumentException
  */
 public function testResolvePathThrowsExceptionOnInvalidFieldName()
 {
     $obj = new DummyEntity();
     $this->factory->expects($this->once())->method('fromField')->with($obj, 'oops')->will($this->returnValue(null));
     $storage = new FileSystemStorage($this->factory);
     $storage->resolvePath($obj, 'oops');
 }
 /**
  * Gets filepath
  *
  * @param Image $image
  *
  * @return string|null
  */
 protected function getFilepath(Image $image)
 {
     $path = $this->storage->resolvePath($image, 'file');
     return $path ? 'gaufrette://' . $path : null;
 }