public function testCroppingWithFullBoxDetails() { $chain = new Chain(); $chain->setRules([new Duplicate(), new Crop(["width" => 500, "height" => 250, "crop-box-width" => 640, "x" => 0, "y" => 0])]); $this->_runner->writeAs("top-crop-{NAME}-{W}")->process("5639.jpg", 100)->run($chain); $this->assertTrue(file_exists($this->_runner->getImage()->getFullPath())); list($width, $height) = getimagesize($this->_runner->getImage()->getFullPath()); $this->assertEquals(500, $width); $this->assertEquals(250, $height); }
/** * @expectedException \Exception * @expectedExceptionMessage Invalid JPG output quality set. Values should be from 1 - 100 */ public function testRunnerOnInvalidJPGQuality() { $runner = new ChainRunner(); $runner->init($this->_basePath)->process("5639.jpg", -1); }