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