assertTrue($intObj instanceof Zend_Pdf_Element_Numeric); } public function testPDFNumericBadArgument() { try { $intObj = new Zend_Pdf_Element_Numeric('some input'); } catch (Zend_Pdf_Exception $e) { $this->assertRegExp('/must be numeric/i', $e->getMessage()); return; } $this->fail('Expected Zend_Pdf_Exception to be thrown'); } public function testGetType() { $intObj = new Zend_Pdf_Element_Numeric(100); $this->assertEquals($intObj->getType(), Zend_Pdf_Element::TYPE_NUMERIC); } public function testToString() { $intObj = new Zend_Pdf_Element_Numeric(100); $this->assertEquals($intObj->toString(), '100'); } public function testToStringFloat1() { $intObj = new Zend_Pdf_Element_Numeric(100.426); $this->assertEquals($intObj->toString(), '100.426'); } public function testToStringFloat2() { $intObj = new Zend_Pdf_Element_Numeric(100.42633); $this->assertEquals($intObj->toString(), '100.42633'); } public function testToStringFloat3() { $intObj = new Zend_Pdf_Element_Numeric(-100.426); $this->assertEquals($intObj->toString(), '-100.426'); } }