예제 #1
0
 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();
 }
예제 #2
0
파일: TestCommon.php 프로젝트: rexmac/zf2
 public function testAddTextWithDefaultColor()
 {
     $object = new TestAsset\BarcodeTest();
     $size = 10;
     $text = 'foobar';
     $position = array();
     $font = 'my_font.ttf';
     $color = 123456;
     $object->setForeColor($color);
     $alignment = 'right';
     $orientation = 45;
     $instructions = array('type' => 'text', 'text' => $text, 'size' => $size, 'position' => $position, 'font' => $font, 'color' => $color, 'alignment' => $alignment, 'orientation' => $orientation);
     $object->addText($text, $size, $position, $font, null, $alignment, $orientation);
     $this->assertSame(array($instructions), $object->getInstructions());
 }