/** * @expectedException \ysaroka\autothumb\exception\ProcessException * @expectedExceptionMessageRegExp /image file extension "[\w\d]+" not allowed for processing/i */ public function testProcessExceptionAllowedExtensions() { $this->config['allowed_extensions'] = ['other-ext']; $this->autoThumb->setConfig($this->config); $this->autoThumb->process($this->variables, false); }
/** * @expectedException \ysaroka\autothumb\exception\ConfigurationException * @expectedExceptionMessageRegExp /Image file "watermark": .* for type "small" does not exist/i */ public function testSetConfigExceptionInvalidWatemarkPath() { $this->config['types'] = ['small' => ['watermark' => TEST_DIR . 'data/images/watermarks/invalid/path/watermark-invalid.png']]; $this->autoThumb->setConfig($this->config); }