Beispiel #1
0
 public function testRendererWithUnkownInstructionProvideByObject()
 {
     $this->setExpectedException('\\Zend\\Barcode\\Renderer\\Exception');
     $object = new TestAsset\BarcodeTest();
     $object->setText('test');
     $object->addTestInstruction(array('type' => 'unknown'));
     $this->renderer->setBarcode($object);
     $this->renderer->draw();
 }
Beispiel #2
0
 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->addTestInstruction($instructions);
     $this->assertSame(array($instructions), $object->getInstructions());
 }