示例#1
0
 /**
  * @param array $config
  * @param ManipulatorFactory $manipulatorFactory
  * @param OpenImageHandler $openImageHandler
  * @param FileManager $fileManager
  */
 public function __construct(array $config, ManipulatorFactory $manipulatorFactory, OpenImageHandler $openImageHandler, FileManager $fileManager)
 {
     $this->config = $config;
     $this->manipulatorFactory = $manipulatorFactory;
     $this->openImageHandler = $openImageHandler;
     $this->openImageHandler->setImageLibrary($this->config['image_adapter']);
     $this->fileManager = $fileManager;
 }
示例#2
0
 public function testOpenImageWithWrongImageLibraryName()
 {
     static::setExpectedExceptionRegExp('Todstoychev\\Icr\\Exception\\IcrRuntimeException');
     $this->openImageHandler->setImageLibrary('test');
     $this->openImageHandler->openImage($this->path);
 }