mirror of
https://github.com/werkraum-media/events.git
synced 2024-11-13 03:36:10 +01:00
Daniel Siepmann
0e5cd38176
The test ensures import runs with a small example set of events. We needed to alter fetching of images, in order to properly mock responses.
38 lines
1.1 KiB
PHP
38 lines
1.1 KiB
PHP
<?php
|
|
|
|
namespace Wrm\Events\Tests\Functional\Import\DestinationDataTest;
|
|
|
|
use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
|
|
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
|
|
|
|
abstract class AbstractTest extends FunctionalTestCase
|
|
{
|
|
protected $testExtensionsToLoad = [
|
|
'typo3conf/ext/events',
|
|
];
|
|
|
|
protected $additionalFoldersToCreate = [
|
|
'uploads/tx_events/'
|
|
];
|
|
|
|
protected function setUp(): void
|
|
{
|
|
parent::setUp();
|
|
|
|
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/Structure.xml');
|
|
$this->setUpBackendUserFromFixture(1);
|
|
|
|
$languageServiceFactory = $this->getContainer()->get(LanguageServiceFactory::class);
|
|
if (!$languageServiceFactory instanceof LanguageServiceFactory) {
|
|
throw new \UnexpectedValueException('Did not retrieve LanguageServiceFactory.', 1637847250);
|
|
}
|
|
$GLOBALS['LANG'] = $languageServiceFactory->create('default');
|
|
}
|
|
|
|
protected function tearDown(): void
|
|
{
|
|
unset($GLOBALS['LANG']);
|
|
|
|
parent::tearDown();
|
|
}
|
|
}
|