/** * Test: standard route * Filename: "Route-only.gpx" */ public function testStandardGPXroute() { $this->object->parseFile('../tests/testfiles/gpx/Route-only.gpx'); $this->assertFalse($this->object->hasMultipleTrainings()); $this->assertFalse($this->object->failed()); $this->assertEquals(0.4, $this->object->object()->getDistance(), '', 0.05); $this->assertTrue($this->object->object()->hasArrayAltitude()); $this->assertTrue($this->object->object()->hasArrayDistance()); $this->assertTrue($this->object->object()->hasArrayLatitude()); $this->assertTrue($this->object->object()->hasArrayLongitude()); }
/** * Fill splits from gpx */ protected function fillSplitsFromGPX() { if ($this->GPXImporter->object()->hasArrayTime() && $this->GPXImporter->object()->hasArrayDistance()) { $this->TrainingObject->Splits()->fillDistancesFromArray($this->GPXImporter->object()->getArrayTime(), $this->GPXImporter->object()->getArrayDistance()); } }