public function testAddInstruction() { $object = new _files\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()); }
/** * @expectedException \Zend\Barcode\Renderer\Exception */ public function testRendererWithUnkownInstructionProvideByObject() { $object = new ObjectNSFiles\BarcodeTest(); $object->setText('test'); $object->addInstruction(array('type' => 'unknown')); $this->_renderer->setBarcode($object); $this->_renderer->draw(); }