Exemple #1
0
 public function testStones()
 {
     $this->object->set(WeightUnit::STONES);
     $this->assertFalse($this->object->isKG());
     $this->assertFalse($this->object->isPounds());
     $this->assertTrue($this->object->isStones());
 }
Exemple #2
0
 /**
  * @return float [mixed unit]
  */
 public function valueInPreferredUnit()
 {
     if ($this->PreferredUnit->isPounds()) {
         return $this->pounds();
     } elseif ($this->PreferredUnit->isStones()) {
         return $this->stones();
     }
     return $this->kg();
 }