/** * Heart rate as string * @return string */ public function string() { if ($this->PreferredUnit->isHRreserve() && $this->canShowInHRrest()) { return $this->asHRrest(); } elseif ($this->PreferredUnit->isHRmax() && $this->canShowInHRmax()) { return $this->asHRmax(); } return $this->asBPM(); }
public function testValues() { $this->assertFalse($this->object->isBPM()); $this->assertTrue($this->object->isHRmax()); $this->assertFalse($this->object->isHRreserve()); $this->object->set(HeartRateUnit::BPM); $this->assertTrue($this->object->isBPM()); $this->assertFalse($this->object->isHRmax()); $this->assertFalse($this->object->isHRreserve()); $this->object->set(HeartRateUnit::HRRESERVE); $this->assertFalse($this->object->isBPM()); $this->assertFalse($this->object->isHRmax()); $this->assertTrue($this->object->isHRreserve()); }