public function testRendererWithUnkownInstructionProvideByObject() { $this->setExpectedException('\Zend\Barcode\Renderer\Exception'); $object = new TestAsset\BarcodeTest(); $object->setText('test'); $object->addInstruction(array('type' => 'unknown')); $this->_renderer->setBarcode($object); $this->_renderer->draw(); }
public function testAddInstruction() { $object = new TestAsset\BarcodeTest(); $instructions = array('type' => 'text', 'text' => 'text', 'size' => 10, 'position' => array(5, 5), 'font' => 'my_font.ttf', 'color' => '#123456', 'alignment' => 'center', 'orientation' => 45); $object->addInstruction($instructions); $this->assertSame(array($instructions), $object->getInstructions()); }