Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
 /**
  * Value in [%] depending on preferred unit
  * @return int
  */
 public function inPercent()
 {
     if ($this->PreferredUnit->isHRreserve() && $this->canShowInHRrest()) {
         return $this->inHRrest();
     }
     return $this->inHRmax();
 }