mirror of
https://github.com/werkraum-media/thuecat.git
synced 2024-12-05 03:26:13 +01:00
Add functional tests for import of tourist information
This commit is contained in:
parent
2d9540436a
commit
db8963d92d
3 changed files with 124 additions and 0 deletions
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<dataset>
|
||||
<pages>
|
||||
<uid>1</uid>
|
||||
<pid>0</pid>
|
||||
<tstamp>1613400587</tstamp>
|
||||
<crdate>1613400558</crdate>
|
||||
<cruser_id>1</cruser_id>
|
||||
<doktype>4</doktype>
|
||||
<title>Rootpage</title>
|
||||
<is_siteroot>1</is_siteroot>
|
||||
</pages>
|
||||
<pages>
|
||||
<uid>10</uid>
|
||||
<pid>1</pid>
|
||||
<tstamp>1613400587</tstamp>
|
||||
<crdate>1613400558</crdate>
|
||||
<cruser_id>1</cruser_id>
|
||||
<doktype>254</doktype>
|
||||
<title>Storage folder</title>
|
||||
</pages>
|
||||
|
||||
<sys_language>
|
||||
<uid>1</uid>
|
||||
<pid>0</pid>
|
||||
<title>English</title>
|
||||
<flag>en-us-gb</flag>
|
||||
<language_isocode>en</language_isocode>
|
||||
</sys_language>
|
||||
|
||||
<sys_language>
|
||||
<uid>2</uid>
|
||||
<pid>0</pid>
|
||||
<title>French</title>
|
||||
<flag>fr</flag>
|
||||
<language_isocode>fr</language_isocode>
|
||||
</sys_language>
|
||||
|
||||
<tx_thuecat_import_configuration>
|
||||
<uid>1</uid>
|
||||
<pid>0</pid>
|
||||
<tstamp>1613400587</tstamp>
|
||||
<crdate>1613400558</crdate>
|
||||
<cruser_id>1</cruser_id>
|
||||
<disable>0</disable>
|
||||
<title>Tourist Information</title>
|
||||
<type>static</type>
|
||||
<configuration><![CDATA[<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
|
||||
<T3FlexForms>
|
||||
<data>
|
||||
<sheet index="sDEF">
|
||||
<language index="lDEF">
|
||||
<field index="storagePid">
|
||||
<value index="vDEF">10</value>
|
||||
</field>
|
||||
<field index="urls">
|
||||
<el index="el">
|
||||
<field index="602a89f54d694654233086">
|
||||
<value index="url">
|
||||
<el>
|
||||
<field index="url">
|
||||
<value index="vDEF">https://thuecat.org/resources/333039283321-xxwg</value>
|
||||
</field>
|
||||
</el>
|
||||
</value>
|
||||
<value index="_TOGGLE">0</value>
|
||||
</field>
|
||||
</el>
|
||||
</field>
|
||||
</language>
|
||||
</sheet>
|
||||
</data>
|
||||
</T3FlexForms>
|
||||
]]></configuration>
|
||||
</tx_thuecat_import_configuration>
|
||||
|
||||
<tx_thuecat_town>
|
||||
<uid>1</uid>
|
||||
<pid>10</pid>
|
||||
<tstamp>1613401129</tstamp>
|
||||
<crdate>1613401129</crdate>
|
||||
<cruser_id>1</cruser_id>
|
||||
<disable>0</disable>
|
||||
<remote_id>https://thuecat.org/resources/043064193523-jcyt</remote_id>
|
||||
<managed_by>1</managed_by>
|
||||
<tourist_information>0</tourist_information>
|
||||
<title>Erfurt</title>
|
||||
</tx_thuecat_town>
|
||||
|
||||
<tx_thuecat_organisation>
|
||||
<uid>1</uid>
|
||||
<pid>10</pid>
|
||||
<tstamp>1613400969</tstamp>
|
||||
<crdate>1613400969</crdate>
|
||||
<cruser_id>1</cruser_id>
|
||||
<disable>0</disable>
|
||||
<remote_id>https://thuecat.org/resources/018132452787-ngbe</remote_id>
|
||||
<title>Erfurt Tourismus und Marketing GmbH</title>
|
||||
<description>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.</description>
|
||||
<manages_towns>0</manages_towns>
|
||||
<manages_tourist_information>0</manages_tourist_information>
|
||||
</tx_thuecat_organisation>
|
||||
</dataset>
|
|
@ -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
|
|
|
@ -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
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue