/** * Set process color model. * * @param string $processColorModel * * @throws \InvalidArgumentException * * @return $this */ public function setProcessColorModel($processColorModel) { $processColorModel = ltrim($processColorModel, '/'); if (!in_array($processColorModel, ProcessColorModel::values())) { throw new \InvalidArgumentException('Invalid process color model argument'); } $this->setArgument(sprintf('-dProcessColorModel=/%s', $processColorModel)); return $this; }
public function testValues() { $values = [ProcessColorModel::DEVICE_RGB, ProcessColorModel::DEVICE_CMYK, ProcessColorModel::DEVICE_GRAY]; $this->assertEquals($values, ProcessColorModel::values()); }