|
|
@@ -48,6 +48,40 @@ class Zend_Barcode_Renderer_SvgTest extends Zend_Barcode_Renderer_TestCommon
|
|
|
$this->assertSame('svg', $this->_renderer->getType());
|
|
|
}
|
|
|
|
|
|
+ public function testGoodHeight()
|
|
|
+ {
|
|
|
+ $this->assertSame(0, $this->_renderer->getHeight());
|
|
|
+ $this->_renderer->setHeight(123);
|
|
|
+ $this->assertSame(123, $this->_renderer->getHeight());
|
|
|
+ $this->_renderer->setHeight(0);
|
|
|
+ $this->assertSame(0, $this->_renderer->getHeight());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @expectedException Zend_Barcode_Renderer_Exception
|
|
|
+ */
|
|
|
+ public function testBadHeight()
|
|
|
+ {
|
|
|
+ $this->_renderer->setHeight(-1);
|
|
|
+ }
|
|
|
+
|
|
|
+ public function testGoodWidth()
|
|
|
+ {
|
|
|
+ $this->assertSame(0, $this->_renderer->getWidth());
|
|
|
+ $this->_renderer->setWidth(123);
|
|
|
+ $this->assertSame(123, $this->_renderer->getWidth());
|
|
|
+ $this->_renderer->setWidth(0);
|
|
|
+ $this->assertSame(0, $this->_renderer->getWidth());
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @expectedException Zend_Barcode_Renderer_Exception
|
|
|
+ */
|
|
|
+ public function testBadWidth()
|
|
|
+ {
|
|
|
+ $this->_renderer->setWidth(-1);
|
|
|
+ }
|
|
|
+
|
|
|
public function testGoodSvgResource()
|
|
|
{
|
|
|
$svgResource = new DOMDocument();
|