コード例 #1
0
ファイル: Weight.php プロジェクト: jorgenils/zend-framework
 /**
  * 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;
 }
コード例 #2
0
ファイル: WeightTest.php プロジェクト: netvlies/zf
 /**
  * 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');
 }