/** * @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; }
public function testOpenImageWithWrongImageLibraryName() { static::setExpectedExceptionRegExp('Todstoychev\\Icr\\Exception\\IcrRuntimeException'); $this->openImageHandler->setImageLibrary('test'); $this->openImageHandler->openImage($this->path); }