/** * Testing the setSize method to see if validation fails. * * @since 1.0 */ public function testSetSizeInvalid() { $this->dbl1 = new Double(); $this->dbl1->setSize(2); try { $this->dbl1->setValue(200); $this->fail('testing passing invalid data to setValue'); } catch (IllegalArguementException $e) { $this->assertEquals('Not a valid double value!', $e->getMessage(), 'testing passing invalid data to setValue'); } }