diff --git a/Tests/Functional/Fixtures/Import/ImportsTouristInformationWithRelation.xml b/Tests/Functional/Fixtures/Import/ImportsTouristInformationWithRelation.xml new file mode 100644 index 0000000..64083ac --- /dev/null +++ b/Tests/Functional/Fixtures/Import/ImportsTouristInformationWithRelation.xml @@ -0,0 +1,103 @@ + + + + 1 + 0 + 1613400587 + 1613400558 + 1 + 4 + Rootpage + 1 + + + 10 + 1 + 1613400587 + 1613400558 + 1 + 254 + Storage folder + + + + 1 + 0 + English + en-us-gb + en + + + + 2 + 0 + French + fr + fr + + + + 1 + 0 + 1613400587 + 1613400558 + 1 + 0 + Tourist Information + static + + + + + + + 10 + + + + + + + + https://thuecat.org/resources/333039283321-xxwg + + + + 0 + + + + + + + + ]]> + + + + 1 + 10 + 1613401129 + 1613401129 + 1 + 0 + https://thuecat.org/resources/043064193523-jcyt + 1 + 0 + Erfurt + + + + 1 + 10 + 1613400969 + 1613400969 + 1 + 0 + https://thuecat.org/resources/018132452787-ngbe + Erfurt Tourismus und Marketing GmbH + Die Erfurt Tourismus & Marketing GmbH (ETMG) wurde 1997 als offizielle Organisation zur Tourismusförderung in der Landeshauptstadt Erfurt gegründet und nahm am 01.0 1.1998 die Geschäftstätigkeit auf. + 0 + 0 + + diff --git a/Tests/Functional/Fixtures/Import/ImportsTouristInformationWithRelationResult.csv b/Tests/Functional/Fixtures/Import/ImportsTouristInformationWithRelationResult.csv new file mode 100644 index 0000000..5ce51f8 --- /dev/null +++ b/Tests/Functional/Fixtures/Import/ImportsTouristInformationWithRelationResult.csv @@ -0,0 +1,3 @@ +"tx_thuecat_tourist_information",,,,,,, +,"uid","pid","remote_id","title","description","managed_by","town" +,1,10,"https://thuecat.org/resources/333039283321-xxwg","Erfurt Tourist Information","Direkt an der Krämerbrücke liegt die Erfurter Tourist Information. Nach einer Modernisierung im Frühjahr 2017 erstrahlt diese in neuem Glanz und ist auch technisch auf dem neuesten Stand. Hier erhalten Sie Stadtpläne, Broschüren zu Erfurt und originelle Souvenirs. Zudem bietet die Tourist Information vielfältige Stadtführungen und Rundfahrten mit Straßenbahn oder Bus sowie kompetente Beratung zu Hotels, Pensionen und Privatunterkünften. ",1,1 diff --git a/Tests/Functional/ImportTest.php b/Tests/Functional/ImportTest.php index 6ed9767..8537d74 100644 --- a/Tests/Functional/ImportTest.php +++ b/Tests/Functional/ImportTest.php @@ -258,6 +258,24 @@ class ImportTest extends TestCase $this->assertCSVDataSet('EXT:thuecat/Tests/Functional/Fixtures/Import/ImportsTouristAttractionsWithRelationsResult.csv'); } + /** + * @test + */ + public function importsTouristInformationWithRelation(): void + { + $this->importDataSet(__DIR__ . '/Fixtures/Import/ImportsTouristInformationWithRelation.xml'); + + $serverRequest = $this->getServerRequest(); + + $extbaseBootstrap = $this->getContainer()->get(Bootstrap::class); + $extbaseBootstrap->handleBackendRequest($serverRequest->reveal()); + + $touristInformation = $this->getAllRecords('tx_thuecat_tourist_information'); + self::assertCount(1, $touristInformation); + + $this->assertCSVDataSet('EXT:thuecat/Tests/Functional/Fixtures/Import/ImportsTouristInformationWithRelationResult.csv'); + } + /** * @test */