storeImageVariation() public method

public storeImageVariation ( $user, $imageIdentifier, $blob, $width )
Example #1
0
 /**
  * @covers Imbo\EventListener\ImageVariations\Storage\Filesystem::storeImageVariation
  * @expectedException Imbo\Exception\StorageException
  * @expectedExceptionMessage Could not store image variation (directory not writable)
  * @expectedExceptionCode 500
  */
 public function testThrowsExceptionWhenNotAbleToWriteToDirectory()
 {
     $dir = 'unwritableDirectory';
     // Create the virtual directory with no permissions
     vfsStream::setup($dir, 0);
     $adapter = new Filesystem(['dataDir' => vfsStream::url($dir)]);
     $adapter->storeImageVariation('pub', 'img', 'blob', 700);
 }