public function testEmptyPauses() { $P = new Pauses(''); $this->assertEquals(0, $P->num()); $P->add(new Pause(60, 10, 120, 100)); $P->fromString(''); $this->assertEquals(0, $P->num()); $this->assertEquals('', $P->asString()); }
protected function simpleObjectByStrings() { $P = new Pauses(); $P->add(new Pause(20, 10, 140, 120)); return new Object(array(Object::ACTIVITYID => 1, Object::TIME => '20' . Object::ARRAY_SEPARATOR . '40', Object::DISTANCE => '0.1' . Object::ARRAY_SEPARATOR . '0.2', Object::HEARTRATE => '140' . Object::ARRAY_SEPARATOR . '120', Object::PAUSES => $P->asString())); }