/** * Compare if the value and type is equal * * @param Zend_Measure_Cooking_Weight $object Cooking Weight object to compare * @return boolean */ public function equals($object) { if ($object->toString() == $this->toString()) { return true; } return false; }
/** * test toString * expected string */ public function testCooking_WeightToString() { $value = new Zend_Measure_Cooking_Weight('-100', Zend_Measure_Cooking_Weight::STANDARD, 'de'); $this->assertEquals('-100 g', $value->toString(), 'Value -100 g expected'); }