loadById($travelId, $filename); $this->assertInstanceOf(\SimpleXMLElement::class, $xml); $travel = $loader->parseXml($xml); $this->assertInstanceOf(Travel::class, $travel); $this->assertEquals('DPWMP060125', $travel->code); $this->assertEquals('F', $travel->type); $this->assertInstanceOf(\DateTimeImmutable::class, $travel->dateFrom); $this->assertInstanceOf(\DateTimeImmutable::class, $travel->dateTo); $this->assertEquals('Davos - Sportclub Waldschlössli', $travel->label); $this->assertEquals(534.2, $travel->priceFrom); $this->assertCount(8, $travel->selectionGroups); $this->assertCount(27, $travel->additionalServices); $this->assertCount(5, $travel->transportationServices); $this->assertCount(7, $travel->pickupsTo); $this->assertCount(12, $travel->rooms); } }