/**
  * Test: only route
  * Filename: "Route-only.tcx" 
  */
 public function testRouteOnly()
 {
     $this->object->parseFile('../tests/testfiles/tcx/Route-only.tcx');
     $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()->hasArrayDistance());
     $this->assertTrue($this->object->object()->hasArrayLatitude());
     $this->assertTrue($this->object->object()->hasArrayLongitude());
     $this->assertFalse($this->object->object()->hasArrayTime());
 }
Пример #2
0
 /**
  * Construct for single file from garmin communicator
  */
 private function constructForSingleFileFromGarminCommunicator()
 {
     $Importer = new ImporterFiletypeTCX();
     $Importer->parseCompressedString($_POST['data']);
     $this->addObjects($Importer->objects());
     $this->addErrors($Importer->getErrors());
 }