/** * @expectedException Zend_Barcode_Renderer_Exception */ public function testRendererWithUnkownInstructionProvideByObject() { require_once dirname(__FILE__) . '/../Object/_files/BarcodeTest.php'; $object = new Zend_Barcode_Object_Test(); $object->setText('test'); $object->addInstruction(array('type' => 'unknown')); $this->_renderer->setBarcode($object); $this->_renderer->draw(); }
public function testAddInstruction() { $object = new Zend_Barcode_Object_Test(); $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()); }