Remove old code base

This commit is contained in:
Daniel Siepmann 2022-11-22 12:49:57 +00:00
parent be56f0fd12
commit 2d2b9ac993
34 changed files with 593 additions and 1402 deletions

View file

@ -1,97 +0,0 @@
<?php
namespace Wrm\Events\Command;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
use TYPO3\CMS\Core\Core\Bootstrap;
use Wrm\Events\Domain\DestinationData\LegacyImportFactory;
use Wrm\Events\Service\DestinationDataImportService;
class DestinationDataImportCommand extends Command
{
/**
* @var DestinationDataImportService
*/
private $destinationDataImportService;
/**
* @var LegacyImportFactory
*/
private $importFactory;
public function __construct(
DestinationDataImportService $destinationDataImportService,
LegacyImportFactory $importFactory
) {
parent::__construct();
$this->destinationDataImportService = $destinationDataImportService;
$this->importFactory = $importFactory;
}
public function configure(): void
{
$this->setDescription('Import Destination Data Events');
$this->setHelp('Destination Data Events are imported');
$this->addArgument(
'storage-pid',
InputArgument::REQUIRED,
'What is the storage pid?'
);
$this->addArgument(
'rest-experience',
InputArgument::REQUIRED,
'What is the rest experience?'
);
$this->addArgument(
'files-folder',
InputArgument::REQUIRED,
'Where to save the image files?'
);
$this->addArgument(
'region-uid',
InputArgument::OPTIONAL,
'What is the region uid?'
);
$this->addArgument(
'query',
InputArgument::OPTIONAL,
'What is the additional query "q" parameter?'
);
}
protected function execute(InputInterface $input, OutputInterface $output)
{
Bootstrap::initializeBackendAuthentication();
$regionUid = $input->getArgument('region-uid');
if (is_numeric($regionUid)) {
$regionUid = (int) $regionUid;
} else {
$regionUid = null;
}
$query = $input->getArgument('query');
if (is_string($query) === false) {
$query = '';
}
$import = $this->importFactory->createFromArray([
'storage_pid' => $input->getArgument('storage-pid'),
'files_folder' => $input->getArgument('files-folder'),
'region_uid' => $regionUid,
'rest_experience' => $input->getArgument('rest-experience'),
'rest_search_query' => $query,
]);
return $this->destinationDataImportService->import(
$import
);
}
}

View file

@ -18,9 +18,6 @@ use Wrm\Events\Events\Controller\DateSearchVariables;
use Wrm\Events\Pagination\Factory; use Wrm\Events\Pagination\Factory;
use Wrm\Events\Service\DataProcessingForModels; use Wrm\Events\Service\DataProcessingForModels;
/**
* DateController
*/
class DateController extends AbstractController class DateController extends AbstractController
{ {
/** /**
@ -104,7 +101,7 @@ class DateController extends AbstractController
): void { ): void {
$demand = $this->demandFactory->fromSettings($this->settings); $demand = $this->demandFactory->fromSettings($this->settings);
if ($search !== []) { if ($search !== []) {
$demand = DateDemand::createFromRequestValues($search, $this->settings); $demand = $this->demandFactory->createFromRequestValues($search, $this->settings);
} }
$dates = $this->dateRepository->findByDemand($demand); $dates = $this->dateRepository->findByDemand($demand);
@ -132,7 +129,7 @@ class DateController extends AbstractController
{ {
$demand = $this->demandFactory->fromSettings($this->settings); $demand = $this->demandFactory->fromSettings($this->settings);
if ($search !== []) { if ($search !== []) {
$demand = DateDemand::createFromRequestValues($search, $this->settings); $demand = $this->demandFactory->createFromRequestValues($search, $this->settings);
} }
$event = $this->eventDispatcher->dispatch(new DateSearchVariables( $event = $this->eventDispatcher->dispatch(new DateSearchVariables(

View file

@ -99,13 +99,7 @@ class ImportFactory
return $result; return $result;
} }
/** private function create(array $data): Import
* Only public in order to be used by LegacyImportFactory.
* Make private once the class is removed.
*
* @internal
*/
public function create(array $data): Import
{ {
$this->createWorkarounds($data); $this->createWorkarounds($data);

View file

@ -1,103 +0,0 @@
<?php
namespace Wrm\Events\Domain\DestinationData;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Persistence\Generic\Session;
use Wrm\Events\Domain\Model\Import;
/**
* This is only for legacy imports where folder is not configured by TCA and provided in TYPO3 way,
* but provided as plain string which was resolved to default storyage within import service.
*
* Should be dropped once old import command is dropped.
*/
class LegacyImportFactory
{
/**
* @var ImportFactory
*/
private $importFactory;
/**
* @var ResourceFactory
*/
private $resourceFactory;
/**
* @var ConfigurationManager
*/
private $configurationManager;
/**
* @var Session
*/
private $extbasePersistenceSession;
public function __construct(
ImportFactory $importFactory,
ResourceFactory $resourceFactory,
ConfigurationManager $configurationManager,
Session $extbasePersistenceSession
) {
$this->importFactory = $importFactory;
$this->resourceFactory = $resourceFactory;
$this->configurationManager = $configurationManager;
$this->extbasePersistenceSession = $extbasePersistenceSession;
}
public function createFromArray(array $configuration): Import
{
$result = array_map('strval', $configuration);
$result['uid'] = $this->getUniqueUid();
$result['files_folder'] = $this->migrateFileFolder($result['files_folder'] ?? '');
$result['region'] = $result['region_uid'];
unset($result['region_uid']);
$result = $this->addCategorySettings($result);
return $this->importFactory->create($result);
}
private function getUniqueUid(): string
{
do {
// Only temporary solution as long as legacy exists.
// Cool solution would be to fetch highest uid + 100, but that's to much for now.
// Also this will vanish in future.
$uid = (string) random_int(999, PHP_INT_MAX);
} while ($this->extbasePersistenceSession->hasIdentifier($uid, Import::class));
return $uid;
}
private function migrateFileFolder(string $fileFolder): string
{
$storage = $this->resourceFactory->getDefaultStorage();
if ($storage === null) {
throw new \Exception('No default storage defined. Cancel import.', 1643290642);
}
$uid = $storage->getUid();
return $uid . ':/' . trim($fileFolder, '/') . '/';
}
private function addCategorySettings(array $result): array
{
$settings = $this->configurationManager->getConfiguration(
ConfigurationManager::CONFIGURATION_TYPE_SETTINGS,
'Events',
'Pi1'
);
$result['categories_pid'] = $settings['destinationData']['categoriesPid'] ?? '';
$result['category_parent'] = $settings['destinationData']['categoryParentUid'] ?? '';
return $result;
}
}

View file

@ -100,56 +100,6 @@ class DateDemand
*/ */
protected $queryCallback = ''; protected $queryCallback = '';
public static function createFromRequestValues(
array $submittedValues,
array $settings
): self {
$instance = new self();
$instance->setSearchword($submittedValues['searchword'] ?? '');
$instance->setSynonyms($settings['synonyms'] ?? []);
if (isset($submittedValues['locations']) && is_array($submittedValues['locations'])) {
$instance->setLocations($submittedValues['locations']);
}
$instance->setRegions(GeneralUtility::intExplode(',', $submittedValues['region'] ?? '', true));
if (isset($submittedValues['regions']) && is_array($submittedValues['regions'])) {
$instance->setRegions($submittedValues['regions']);
}
if ($submittedValues['highlight'] ?? false) {
$instance->setHighlight(true);
}
if (isset($submittedValues['start']) && $submittedValues['start'] !== '') {
$instance->setStart(strtotime($submittedValues['start'] . ' 00:00') ?: null);
}
if (isset($submittedValues['end']) && $submittedValues['end'] !== '') {
$instance->setEnd(strtotime($submittedValues['end'] . ' 23:59') ?: null);
}
if (isset($submittedValues['considerDate']) && $submittedValues['considerDate'] !== '') {
$instance->setConsiderDate((bool)$submittedValues['considerDate']);
}
if (isset($submittedValues['userCategories']) && is_array($submittedValues['userCategories'])) {
$instance->setUserCategories($submittedValues['userCategories']);
}
if (isset($submittedValues['features']) && is_array($submittedValues['features'])) {
$instance->setFeatures($submittedValues['features']);
}
$instance->setSortBy($settings['sortByDate'] ?? '');
$instance->setSortOrder($settings['sortOrder'] ?? '');
$instance->setQueryCallback($settings['queryCallback'] ?? '');
if (!empty($settings['limit'])) {
$instance->setLimit($settings['limit']);
}
return $instance;
}
public function getSortBy(): string public function getSortBy(): string
{ {
return $this->sortBy; return $this->sortBy;

View file

@ -105,4 +105,54 @@ class DateDemandFactory
return $demand; return $demand;
} }
public function createFromRequestValues(
array $submittedValues,
array $settings
): DateDemand {
$instance = new DateDemand();
$instance->setSearchword($submittedValues['searchword'] ?? '');
$instance->setSynonyms($settings['synonyms'] ?? []);
if (isset($submittedValues['locations']) && is_array($submittedValues['locations'])) {
$instance->setLocations($submittedValues['locations']);
}
$instance->setRegions(GeneralUtility::intExplode(',', $submittedValues['region'] ?? '', true));
if (isset($submittedValues['regions']) && is_array($submittedValues['regions'])) {
$instance->setRegions($submittedValues['regions']);
}
if ($submittedValues['highlight'] ?? false) {
$instance->setHighlight(true);
}
if (isset($submittedValues['start']) && $submittedValues['start'] !== '') {
$instance->setStart(strtotime($submittedValues['start'] . ' 00:00') ?: null);
}
if (isset($submittedValues['end']) && $submittedValues['end'] !== '') {
$instance->setEnd(strtotime($submittedValues['end'] . ' 23:59') ?: null);
}
if (isset($submittedValues['considerDate']) && $submittedValues['considerDate'] !== '') {
$instance->setConsiderDate((bool)$submittedValues['considerDate']);
}
if (isset($submittedValues['userCategories']) && is_array($submittedValues['userCategories'])) {
$instance->setUserCategories($submittedValues['userCategories']);
}
if (isset($submittedValues['features']) && is_array($submittedValues['features'])) {
$instance->setFeatures($submittedValues['features']);
}
$instance->setSortBy($settings['sortByDate'] ?? '');
$instance->setSortOrder($settings['sortOrder'] ?? '');
$instance->setQueryCallback($settings['queryCallback'] ?? '');
if (!empty($settings['limit'])) {
$instance->setLimit($settings['limit']);
}
return $instance;
}
} }

View file

@ -140,55 +140,6 @@ class Event extends AbstractEntity
*/ */
protected $dataProcessing = null; protected $dataProcessing = null;
// Legacy location related info
/**
* @var string
*/
protected $name = '';
/**
* @var string
*/
protected $street = '';
/**
* @var string
*/
protected $district = '';
/**
* @var string
*/
protected $city = '';
/**
* @var string
*/
protected $zip = '';
/**
* @var string
*/
protected $country = '';
/**
* @var string
*/
protected $phone = '';
/**
* @var string
*/
protected $latitude = '';
/**
* @var string
*/
protected $longitude = '';
// End of legacy location info
public function __construct() public function __construct()
{ {
$this->initStorageObjects(); $this->initStorageObjects();
@ -406,21 +357,6 @@ class Event extends AbstractEntity
public function setLocation(?Location $location): void public function setLocation(?Location $location): void
{ {
$this->location = $location; $this->location = $location;
// Keep this block as long as event still has the properties for legacy reasons.
// This ensures there is only a single point of truth, the new location object.
// That way we detect issues earlier and can migrate them until we get rid of the legacy code base.
if ($location instanceof Location) {
$this->name = '';
$this->street = '';
$this->district = '';
$this->city = '';
$this->zip = '';
$this->country = '';
$this->phone = '';
$this->latitude = '';
$this->longitude = '';
}
} }
public function getLocation(): ?Location public function getLocation(): ?Location
@ -533,87 +469,4 @@ class Event extends AbstractEntity
{ {
return $this->_localizedUid; return $this->_localizedUid;
} }
// Legacy location related info
public function getName(): string
{
if ($this->location instanceof Location) {
return $this->location->getName();
}
return $this->name;
}
public function getStreet(): string
{
if ($this->location instanceof Location) {
return $this->location->getStreet();
}
return $this->street;
}
public function getDistrict(): string
{
if ($this->location instanceof Location) {
return $this->location->getDistrict();
}
return $this->district;
}
public function getCountry(): string
{
if ($this->location instanceof Location) {
return $this->location->getCountry();
}
return $this->country;
}
public function getCity(): string
{
if ($this->location instanceof Location) {
return $this->location->getCity();
}
return $this->city;
}
public function getZip(): string
{
if ($this->location instanceof Location) {
return $this->location->getZip();
}
return $this->zip;
}
public function getPhone(): string
{
if ($this->location instanceof Location) {
return $this->location->getPhone();
}
return $this->phone;
}
public function getLatitude(): string
{
if ($this->location instanceof Location) {
return $this->location->getLatitude();
}
return $this->latitude;
}
public function getLongitude(): string
{
if ($this->location instanceof Location) {
return $this->location->getLongitude();
}
return $this->longitude;
}
} }

View file

@ -1,11 +0,0 @@
<?php
namespace Wrm\Events\ViewHelpers;
class FormViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper
{
protected function renderHiddenReferrerFields()
{
return '';
}
}

View file

@ -7,19 +7,6 @@ services:
Wrm\Events\: Wrm\Events\:
resource: '../Classes/*' resource: '../Classes/*'
events.levacy_comannd_identifier:
class: 'Wrm\Events\Command\DestinationDataImportCommand'
tags:
- name: 'console.command'
command: 'events:destinationdataimport'
description: 'Mind the trailing ",", there for backwards compatibility'
Wrm\Events\Command\DestinationDataImportCommand:
tags:
- name: 'console.command'
command: 'events:destinationdataimport'
description: 'Import Destination Data Events'
Wrm\Events\Command\ImportDestinationDataViaConfigruationCommand: Wrm\Events\Command\ImportDestinationDataViaConfigruationCommand:
tags: tags:
- name: 'console.command' - name: 'console.command'

View file

@ -47,15 +47,6 @@ return [
dates, dates,
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.location, --div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.location,
location, location,
name,
street,
district,
city,
zip,
country,
phone,
latitude,
longitude,
--div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.relations, --div--;' . $l10nPath . ':tx_events_domain_model_event.tabs.relations,
organizer, organizer,
region, region,
@ -263,69 +254,6 @@ return [
'eval' => 'trim' 'eval' => 'trim'
] ]
], ],
'name' => [
'exclude' => true,
'label' => $l10nLocationPath . ':tx_events_domain_model_location.name',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'street' => [
'exclude' => true,
'label' => $l10nLocationPath . ':tx_events_domain_model_location.street',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'district' => [
'exclude' => true,
'label' => $l10nLocationPath . ':tx_events_domain_model_location.district',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'city' => [
'exclude' => true,
'label' => $l10nLocationPath . ':tx_events_domain_model_location.city',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'zip' => [
'exclude' => true,
'label' => $l10nLocationPath . ':tx_events_domain_model_location.zip',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'country' => [
'exclude' => true,
'label' => $l10nLocationPath . ':tx_events_domain_model_location.country',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'phone' => [
'exclude' => true,
'label' => $l10nLocationPath . ':tx_events_domain_model_location.phone',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'web' => [ 'web' => [
'exclude' => true, 'exclude' => true,
'label' => $l10nPath . ':tx_events_domain_model_event.web', 'label' => $l10nPath . ':tx_events_domain_model_event.web',
@ -374,24 +302,6 @@ return [
'eval' => 'trim' 'eval' => 'trim'
], ],
], ],
'latitude' => [
'exclude' => true,
'label' => $l10nLocationPath . ':tx_events_domain_model_location.latitude',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'longitude' => [
'exclude' => true,
'label' => $l10nLocationPath . ':tx_events_domain_model_location.longitude',
'config' => [
'type' => 'input',
'size' => 30,
'eval' => 'trim'
],
],
'images' => [ 'images' => [
'exclude' => true, 'exclude' => true,
'label' => $l10nPath . ':tx_events_domain_model_event.images', 'label' => $l10nPath . ':tx_events_domain_model_event.images',

View file

@ -30,6 +30,21 @@ string value necessary or Fluid forms.
Those are not considered public API. Use ``getStartObject()`` and ``getEndObject()`` Those are not considered public API. Use ``getStartObject()`` and ``getEndObject()``
instead. instead.
The static method ``createFromRequestValues()`` was moved as an instance method to
the factory, in order to streamline factories.
The old location properties were removed from events.
The locations are imported as dedicated instance already.
The corresponding TCA and database columns got removed as well.
The Form ViewHelper got removed as it was unused.
Removed command
^^^^^^^^^^^^^^^
The legacy command was removed. It now is necessary to create import configurations
and use new commands to import those configurations.
Features Features
-------- --------

View file

@ -11,7 +11,7 @@ use TYPO3\CMS\Core\Context\Context;
use TYPO3\CMS\Core\Context\DateTimeAspect; use TYPO3\CMS\Core\Context\DateTimeAspect;
use TYPO3\CMS\Core\Localization\LanguageServiceFactory; use TYPO3\CMS\Core\Localization\LanguageServiceFactory;
use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;
use Wrm\Events\Command\DestinationDataImportCommand; use Wrm\Events\Command\ImportDestinationDataViaConfigruationCommand;
use Wrm\Events\Tests\ClientFactory; use Wrm\Events\Tests\ClientFactory;
abstract class AbstractTest extends FunctionalTestCase abstract class AbstractTest extends FunctionalTestCase
@ -72,8 +72,8 @@ abstract class AbstractTest extends FunctionalTestCase
} }
protected function executeCommand( protected function executeCommand(
array $argumentsAndOptions, array $argumentsAndOptions = ['configurationUid' => '1'],
string $command = DestinationDataImportCommand::class string $command = ImportDestinationDataViaConfigruationCommand::class
): CommandTester { ): CommandTester {
$subject = $this->getContainer()->get($command); $subject = $this->getContainer()->get($command);
self::assertInstanceOf(Command::class, $subject); self::assertInstanceOf(Command::class, $subject);

View file

@ -1,51 +1,51 @@
"tx_events_domain_model_organizer",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "tx_events_domain_model_organizer",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,"uid","pid","cruser_id","deleted","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","t3ver_stage","name","street","district","city","zip","phone","web","email",,,,,,,,,,,,,,,,,,,,,,, ,"uid","pid","cruser_id","deleted","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","t3ver_stage","name","street","district","city","zip","phone","web","email",,,,,,,,,,,,,,
,"1","2","0","0","0","0","0","-1","0","0","0","0","0","Schillerhaus Rudolstadt","Schillerstraße 25",,"Rudolstadt","07407","+ 49 3672 / 486470","http://schillerhaus.rudolstadt.de","schillerhaus@rudolstadt.de",,,,,,,,,,,,,,,,,,,,,,, ,"1","2","0","0","0","0","0","-1","0","0","0","0","0","Schillerhaus Rudolstadt","Schillerstraße 25",,"Rudolstadt","07407","+ 49 3672 / 486470","http://schillerhaus.rudolstadt.de","schillerhaus@rudolstadt.de",,,,,,,,,,,,,,
,"2","2","0","0","0","0","0","-1","0","0","0","0","0","Stadtbibliothek Rudolstadt","Schulplatz 13",,"Rudolstadt","07407","0 36 72 - 48 64 20","http://www.stadtbibliothek-rudolstadt.de ","stadtbibliothek@rudolstadt.de",,,,,,,,,,,,,,,,,,,,,,, ,"2","2","0","0","0","0","0","-1","0","0","0","0","0","Stadtbibliothek Rudolstadt","Schulplatz 13",,"Rudolstadt","07407","0 36 72 - 48 64 20","http://www.stadtbibliothek-rudolstadt.de ","stadtbibliothek@rudolstadt.de",,,,,,,,,,,,,,
,"3","2","0","0","0","0","0","-1","0","0","0","0","0","Lutherkirche","Caspar-Schulte-Straße",,"Rudolstadt","07407","03672 - 48 96 13",,,,,,,,,,,,,,,,,,,,,,,,, ,"3","2","0","0","0","0","0","-1","0","0","0","0","0","Lutherkirche","Caspar-Schulte-Straße",,"Rudolstadt","07407","03672 - 48 96 13",,,,,,,,,,,,,,,,
"tx_events_domain_model_event",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "tx_events_domain_model_event",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,"uid","pid","cruser_id","deleted","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","t3ver_stage","title","subtitle","global_id","slug","highlight","teaser","details","price_info","web","phone","ticket","facebook","youtube","instagram","images","categories","pages","dates","organizer","partner","region","references_events","location","name","street","district","city","zip","country","latitude","longitude" ,"uid","pid","cruser_id","deleted","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","t3ver_stage","title","subtitle","global_id","slug","highlight","teaser","details","price_info","web","ticket","facebook","youtube","instagram","images","categories","pages","dates","organizer","partner","region","references_events","location"
,"1","2","0","0","0","0","0","-1","0","0","0","0","0","Allerlei Weihnachtliches (Heute mit Johannes Geißer)",,"e_100347853","e-100347853","0",,"Die Lichter sind entzündet, die Plätzchen duften, man rückt endlich wieder näher zusammen und lauscht den Geschichten. Vier Schauspieler*innen unseres Theaters überraschen mit ihren weihnachtlichen Texten, die sie für uns ausgewählt haben. Dazu plaudern sie über persönliche Anekdoten und erinnern sich an ihre schönsten und verrücktesten Weihnachtsfeste. Und da der Genuss in der Vorweihnachtszeit nicht fehlen darf, wird an jedem Adventssonntag eine andere weihnachtliche Spezialität serviert. ,"1","2","0","0","0","0","0","-1","0","0","0","0","0","Allerlei Weihnachtliches (Heute mit Johannes Geißer)",,"e_100347853","e-100347853","0",,"Die Lichter sind entzündet, die Plätzchen duften, man rückt endlich wieder näher zusammen und lauscht den Geschichten. Vier Schauspieler*innen unseres Theaters überraschen mit ihren weihnachtlichen Texten, die sie für uns ausgewählt haben. Dazu plaudern sie über persönliche Anekdoten und erinnern sich an ihre schönsten und verrücktesten Weihnachtsfeste. Und da der Genuss in der Vorweihnachtszeit nicht fehlen darf, wird an jedem Adventssonntag eine andere weihnachtliche Spezialität serviert.
Eintritt: 10 € (inkl. Gedeck mit weihnachtlicher Schillerlocke) Eintritt: 10 € (inkl. Gedeck mit weihnachtlicher Schillerlocke)
Um Voranmeldung unter 03672-486470 oder schillerhaus@rudolstadt.de wird gebeten. Um Voranmeldung unter 03672-486470 oder schillerhaus@rudolstadt.de wird gebeten.
Es gilt die 2G-PLUS-Regel.",,"http://www.schillerhaus.rudolstadt.de/",,,,,,"1","1",,"1","1",,"1",,1,,,,,,,, Es gilt die 2G-PLUS-Regel.",,"http://www.schillerhaus.rudolstadt.de/",,,,,"1","1",,"1","1",,"1",,1
,"2","2","0","0","0","0","0","-1","0","0","0","0","0","Tüftlerzeit",,"e_100354481","e-100354481","0",,"Die Tüftlerzeit wird dieses Mal ein weihnachtliches Angebot bereithalten. Alle kleinen Tüftler dürfen gespannt sein. ,"2","2","0","0","0","0","0","-1","0","0","0","0","0","Tüftlerzeit",,"e_100354481","e-100354481","0",,"Die Tüftlerzeit wird dieses Mal ein weihnachtliches Angebot bereithalten. Alle kleinen Tüftler dürfen gespannt sein.
Voranmeldung über: kinderbibliothek@rudolstadt.de oder 03672-486420 Voranmeldung über: kinderbibliothek@rudolstadt.de oder 03672-486420
Bitte beachten Sie die derzeit geltenden Zugangsregeln.",,"http://www.stadtbibliothek-rudolstadt.de/",,,,,,"1","1",,"4","2",,"1",,2,,,,,,,, Bitte beachten Sie die derzeit geltenden Zugangsregeln.",,"http://www.stadtbibliothek-rudolstadt.de/",,,,,"1","1",,"4","2",,"1",,2
,"3","2","0","0","0","0","0","-1","0","0","0","0","0","Adventliche Orgelmusik (Orgel: KMD Frank Bettenhausen)",,"e_100350503","e-100350503","0",,"Immer mittwochs in der Adventszeit spielt Frank Bettenhausen solo und zusammen mit anderen Musikern auf der Steinmeyerorgel aus dem Jahr 1906. Bekannte Adventslieder, barocke und romantische Kompositionen stehen neben besinnlichen Texten von Pfarrer Johannes-Martin Weiss. ,"3","2","0","0","0","0","0","-1","0","0","0","0","0","Adventliche Orgelmusik (Orgel: KMD Frank Bettenhausen)",,"e_100350503","e-100350503","0",,"Immer mittwochs in der Adventszeit spielt Frank Bettenhausen solo und zusammen mit anderen Musikern auf der Steinmeyerorgel aus dem Jahr 1906. Bekannte Adventslieder, barocke und romantische Kompositionen stehen neben besinnlichen Texten von Pfarrer Johannes-Martin Weiss.
Es gilt die 2G-PLUS-Regel.",,,,,,,,"1","2",,"8","3",,"1",,3,,,,,,,, Es gilt die 2G-PLUS-Regel.",,,,,,,"1","2",,"8","3",,"1",,3
"tx_events_domain_model_date",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "tx_events_domain_model_date",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","event","start","end","canceled","postponed_date","canceled_link",,,,,,,,,,,,,,,,,,,,,,,,,,, ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","event","start","end","canceled","postponed_date","canceled_link",,,,,,,,,,,,,,,,,,
,"1","2","0","0","0","0",-1,0,"0","0","0","1","1671458400","1671463800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"1","2","0","0","0","0",-1,0,"0","0","0","1","1671458400","1671463800","no","0",,,,,,,,,,,,,,,,,,,
,"2","2","0","0","0","0",-1,0,"0","0","0","2","1671199200","1671204600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"2","2","0","0","0","0",-1,0,"0","0","0","2","1671199200","1671204600","no","0",,,,,,,,,,,,,,,,,,,
,"3","2","0","0","0","0",-1,0,"0","0","0","2",1648803600,1648810800,"no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"3","2","0","0","0","0",-1,0,"0","0","0","2",1648803600,1648810800,"no","0",,,,,,,,,,,,,,,,,,,
,"4","2","0","0","0","0",-1,0,"0","0","0","2",1648890000,1648897200,"no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"4","2","0","0","0","0",-1,0,"0","0","0","2",1648890000,1648897200,"no","0",,,,,,,,,,,,,,,,,,,
,"5","2","0","0","0","0",-1,0,"0","0","0","2","1645106400","1645113600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"5","2","0","0","0","0",-1,0,"0","0","0","2","1645106400","1645113600","no","0",,,,,,,,,,,,,,,,,,,
,"6","2","0","0","0","0",-1,0,"0","0","0","3","1669917600","1669921200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"6","2","0","0","0","0",-1,0,"0","0","0","3","1669917600","1669921200","no","0",,,,,,,,,,,,,,,,,,,
,"7","2","0","0","0","0",-1,0,"0","0","0","3","1667642400","1667649600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"7","2","0","0","0","0",-1,0,"0","0","0","3","1667642400","1667649600","no","0",,,,,,,,,,,,,,,,,,,
,"8","2","0","0","0","0",-1,0,"0","0","0","3","1668247200","1668254400","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"8","2","0","0","0","0",-1,0,"0","0","0","3","1668247200","1668254400","no","0",,,,,,,,,,,,,,,,,,,
,"9","2","0","0","0","0",-1,0,"0","0","0","3","1668852000","1668859200","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"9","2","0","0","0","0",-1,0,"0","0","0","3","1668852000","1668859200","no","0",,,,,,,,,,,,,,,,,,,
,"10","2","0","0","0","0",-1,0,"0","0","0","3","1667728800","1667736000","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"10","2","0","0","0","0",-1,0,"0","0","0","3","1667728800","1667736000","no","0",,,,,,,,,,,,,,,,,,,
,"11","2","0","0","0","0",-1,0,"0","0","0","3","1668333600","1668340800","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"11","2","0","0","0","0",-1,0,"0","0","0","3","1668333600","1668340800","no","0",,,,,,,,,,,,,,,,,,,
,"12","2","0","0","0","0",-1,0,"0","0","0","3","1668938400","1668945600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"12","2","0","0","0","0",-1,0,"0","0","0","3","1668938400","1668945600","no","0",,,,,,,,,,,,,,,,,,,
,"13","2","0","0","0","0",-1,0,"0","0","0","3","1671732000","1671735600","no","0",,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"13","2","0","0","0","0",-1,0,"0","0","0","3","1671732000","1671735600","no","0",,,,,,,,,,,,,,,,,,,
"tx_events_domain_model_location",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "tx_events_domain_model_location",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","name","street","district","city","zip","country","latitude","longitude","phone",,,,,,,,,,,,,,,,,,,,,,,, ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","t3ver_oid","t3ver_wsid","t3ver_state","name","street","district","city","zip","country","latitude","longitude","phone",,,,,,,,,,,,,,,
,"1","2","0","0","0","0",-1,0,"0","0","0","Schillerhaus Rudolstadt","Schillerstraße 25",,"Rudolstadt","07407","Deutschland","50.720971023259","11.335229873657","+ 49 3672 / 486470",,,,,,,,,,,,,,,,,,,,,,,, ,"1","2","0","0","0","0",-1,0,"0","0","0","Schillerhaus Rudolstadt","Schillerstraße 25",,"Rudolstadt","07407","Deutschland","50.720971023259","11.335229873657","+ 49 3672 / 486470",,,,,,,,,,,,,,,
,"2","2","0","0","0","0",-1,0,"0","0","0","Stadtbibliothek Rudolstadt","Schulplatz 13",,"Rudolstadt","07407","Deutschland","50.720835175056","11.342568397522","0 36 72 - 48 64 20",,,,,,,,,,,,,,,,,,,,,,,, ,"2","2","0","0","0","0",-1,0,"0","0","0","Stadtbibliothek Rudolstadt","Schulplatz 13",,"Rudolstadt","07407","Deutschland","50.720835175056","11.342568397522","0 36 72 - 48 64 20",,,,,,,,,,,,,,,
,"3","2","0","0","0","0",-1,0,"0","0","0","Lutherkirche","Caspar-Schulte-Straße",,"Rudolstadt","07407","Deutschland","50.718688721183","11.327333450317","03672 - 48 96 13",,,,,,,,,,,,,,,,,,,,,,,, ,"3","2","0","0","0","0",-1,0,"0","0","0","Lutherkirche","Caspar-Schulte-Straße",,"Rudolstadt","07407","Deutschland","50.718688721183","11.327333450317","03672 - 48 96 13",,,,,,,,,,,,,,,
"sys_category",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "sys_category",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","title","items","parent",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"uid","pid","cruser_id","hidden","starttime","endtime","sys_language_uid","l10n_parent","title","items","parent",,,,,,,,,,,,,,,,,,,,,,,,
,1,2,0,0,0,0,0,0,"Top Category",0,0,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,1,2,0,0,0,0,0,0,"Top Category",0,0,,,,,,,,,,,,,,,,,,,,,,,,
,2,2,0,0,0,0,0,0,"Event Category Parent",0,1,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,2,2,0,0,0,0,0,0,"Event Category Parent",0,1,,,,,,,,,,,,,,,,,,,,,,,,
,3,2,0,0,0,0,0,0,"Weihnachten",0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,3,2,0,0,0,0,0,0,"Weihnachten",0,2,,,,,,,,,,,,,,,,,,,,,,,,
,4,2,0,0,0,0,0,0,"Kinder",0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,4,2,0,0,0,0,0,0,"Kinder",0,2,,,,,,,,,,,,,,,,,,,,,,,,
,5,2,0,0,0,0,0,0,"Konzerte, Festivals, Show & Tanz",0,2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,5,2,0,0,0,0,0,0,"Konzerte, Festivals, Show & Tanz",0,2,,,,,,,,,,,,,,,,,,,,,,,,
"sys_category_record_mm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, "sys_category_record_mm",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,"uid_local","uid_foreign","tablenames","fieldname",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,"uid_local","uid_foreign","tablenames","fieldname",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,3,1,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,3,1,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,4,2,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,4,2,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,5,3,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,5,3,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,3,3,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, ,3,3,"tx_events_domain_model_event","categories",,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,

1 tx_events_domain_model_organizer
2 uid pid cruser_id deleted hidden starttime endtime sys_language_uid l10n_parent t3ver_oid t3ver_wsid t3ver_state t3ver_stage name street district city zip phone web email
3 1 2 0 0 0 0 0 -1 0 0 0 0 0 Schillerhaus Rudolstadt Schillerstraße 25 Rudolstadt 07407 + 49 3672 / 486470 http://schillerhaus.rudolstadt.de schillerhaus@rudolstadt.de
4 2 2 0 0 0 0 0 -1 0 0 0 0 0 Stadtbibliothek Rudolstadt Schulplatz 13 Rudolstadt 07407 0 36 72 - 48 64 20 http://www.stadtbibliothek-rudolstadt.de stadtbibliothek@rudolstadt.de
5 3 2 0 0 0 0 0 -1 0 0 0 0 0 Lutherkirche Caspar-Schulte-Straße Rudolstadt 07407 03672 - 48 96 13
6 tx_events_domain_model_event
7 uid pid cruser_id deleted hidden starttime endtime sys_language_uid l10n_parent t3ver_oid t3ver_wsid t3ver_state t3ver_stage title subtitle global_id slug highlight teaser details price_info web phone ticket ticket facebook facebook youtube youtube instagram instagram images images categories categories pages pages dates dates organizer organizer partner partner region region references_events references_events location location name street district city zip country latitude longitude
8 1 2 0 0 0 0 0 -1 0 0 0 0 0 Allerlei Weihnachtliches (Heute mit Johannes Geißer) e_100347853 e-100347853 0 Die Lichter sind entzündet, die Plätzchen duften, man rückt endlich wieder näher zusammen und lauscht den Geschichten. Vier Schauspieler*innen unseres Theaters überraschen mit ihren weihnachtlichen Texten, die sie für uns ausgewählt haben. Dazu plaudern sie über persönliche Anekdoten und erinnern sich an ihre schönsten und verrücktesten Weihnachtsfeste. Und da der Genuss in der Vorweihnachtszeit nicht fehlen darf, wird an jedem Adventssonntag eine andere weihnachtliche Spezialität serviert. Eintritt: 10 € (inkl. Gedeck mit weihnachtlicher Schillerlocke) Um Voranmeldung unter 03672-486470 oder schillerhaus@rudolstadt.de wird gebeten. Es gilt die 2G-PLUS-Regel. http://www.schillerhaus.rudolstadt.de/ 1 1 1 1 1 1 1 1 1 1
9 2 2 0 0 0 0 0 -1 0 0 0 0 0 Tüftlerzeit e_100354481 e-100354481 0 Die Tüftlerzeit wird dieses Mal ein weihnachtliches Angebot bereithalten. Alle kleinen Tüftler dürfen gespannt sein. Voranmeldung über: kinderbibliothek@rudolstadt.de oder 03672-486420 Bitte beachten Sie die derzeit geltenden Zugangsregeln. http://www.stadtbibliothek-rudolstadt.de/ 1 1 1 4 4 2 2 1 1 2 2
10 3 2 0 0 0 0 0 -1 0 0 0 0 0 Adventliche Orgelmusik (Orgel: KMD Frank Bettenhausen) e_100350503 e-100350503 0 Immer mittwochs in der Adventszeit spielt Frank Bettenhausen solo und zusammen mit anderen Musikern auf der Steinmeyerorgel aus dem Jahr 1906. Bekannte Adventslieder, barocke und romantische Kompositionen stehen neben besinnlichen Texten von Pfarrer Johannes-Martin Weiss. Es gilt die 2G-PLUS-Regel. 1 1 2 2 8 8 3 3 1 1 3 3
11 tx_events_domain_model_date
12 uid pid cruser_id hidden starttime endtime sys_language_uid l10n_parent t3ver_oid t3ver_wsid t3ver_state event start end canceled postponed_date canceled_link
13 1 2 0 0 0 0 -1 0 0 0 0 1 1671458400 1671463800 no 0
14 2 2 0 0 0 0 -1 0 0 0 0 2 1671199200 1671204600 no 0
15 3 2 0 0 0 0 -1 0 0 0 0 2 1648803600 1648810800 no 0
16 4 2 0 0 0 0 -1 0 0 0 0 2 1648890000 1648897200 no 0
17 5 2 0 0 0 0 -1 0 0 0 0 2 1645106400 1645113600 no 0
18 6 2 0 0 0 0 -1 0 0 0 0 3 1669917600 1669921200 no 0
19 7 2 0 0 0 0 -1 0 0 0 0 3 1667642400 1667649600 no 0
20 8 2 0 0 0 0 -1 0 0 0 0 3 1668247200 1668254400 no 0
21 9 2 0 0 0 0 -1 0 0 0 0 3 1668852000 1668859200 no 0
22 10 2 0 0 0 0 -1 0 0 0 0 3 1667728800 1667736000 no 0
23 11 2 0 0 0 0 -1 0 0 0 0 3 1668333600 1668340800 no 0
24 12 2 0 0 0 0 -1 0 0 0 0 3 1668938400 1668945600 no 0
25 13 2 0 0 0 0 -1 0 0 0 0 3 1671732000 1671735600 no 0
26 tx_events_domain_model_location
27 uid pid cruser_id hidden starttime endtime sys_language_uid l10n_parent t3ver_oid t3ver_wsid t3ver_state name street district city zip country latitude longitude phone
28 1 2 0 0 0 0 -1 0 0 0 0 Schillerhaus Rudolstadt Schillerstraße 25 Rudolstadt 07407 Deutschland 50.720971023259 11.335229873657 + 49 3672 / 486470
29 2 2 0 0 0 0 -1 0 0 0 0 Stadtbibliothek Rudolstadt Schulplatz 13 Rudolstadt 07407 Deutschland 50.720835175056 11.342568397522 0 36 72 - 48 64 20
30 3 2 0 0 0 0 -1 0 0 0 0 Lutherkirche Caspar-Schulte-Straße Rudolstadt 07407 Deutschland 50.718688721183 11.327333450317 03672 - 48 96 13
31 sys_category
32 uid pid cruser_id hidden starttime endtime sys_language_uid l10n_parent title items parent
33 1 2 0 0 0 0 0 0 Top Category 0 0
34 2 2 0 0 0 0 0 0 Event Category Parent 0 1
35 3 2 0 0 0 0 0 0 Weihnachten 0 2
36 4 2 0 0 0 0 0 0 Kinder 0 2
37 5 2 0 0 0 0 0 0 Konzerte, Festivals, Show & Tanz 0 2
38 sys_category_record_mm
39 uid_local uid_foreign tablenames fieldname
40 3 1 tx_events_domain_model_event categories
41 4 2 tx_events_domain_model_event categories
42 5 3 tx_events_domain_model_event categories
43 3 3 tx_events_domain_model_event categories
44
45
46
47
48
49
50
51

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<dataset>
<tx_events_domain_model_import>
<uid>1</uid>
<pid>2</pid>
<title>Example import configuration</title>
<storage_pid>2</storage_pid>
<files_folder>1:/staedte/beispielstadt/events/</files_folder>
<region>1</region>
<rest_experience>beispielstadt</rest_experience>
</tx_events_domain_model_import>
</dataset>

View file

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<dataset>
<tx_events_domain_model_import>
<uid>1</uid>
<pid>2</pid>
<title>Example import configuration</title>
<storage_pid>2</storage_pid>
<files_folder>1:/staedte/beispielstadt/events/</files_folder>
<categories_pid>2</categories_pid>
<category_parent>2</category_parent>
<region>1</region>
<rest_experience>beispielstadt</rest_experience>
</tx_events_domain_model_import>
</dataset>

View file

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<dataset>
<tx_events_domain_model_import>
<uid>1</uid>
<pid>2</pid>
<title>Example import configuration</title>
<storage_pid>2</storage_pid>
<files_folder>1:/staedte/beispielstadt/events/</files_folder>
<rest_experience>beispielstadt</rest_experience>
</tx_events_domain_model_import>
</dataset>

View file

@ -20,6 +20,7 @@ class ImportCleansTransientFilesTest extends AbstractTest
$fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration; $fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration;
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/DefaultImportConfiguration.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
'restUrl = https://example.com/some-path/', 'restUrl = https://example.com/some-path/',
'license = example-license', 'license = example-license',
@ -27,8 +28,6 @@ class ImportCleansTransientFilesTest extends AbstractTest
'restLimit = 3', 'restLimit = 3',
'restMode = next_months,12', 'restMode = next_months,12',
'restTemplate = ET2014A.json', 'restTemplate = ET2014A.json',
'categoriesPid = ',
'categoryParentUid = ',
]); ]);
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
@ -38,11 +37,7 @@ class ImportCleansTransientFilesTest extends AbstractTest
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());

View file

@ -20,6 +20,7 @@ class ImportDoesNotUseUploadsFolderTest extends AbstractTest
$fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration; $fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration;
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/DefaultImportConfiguration.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
'restUrl = https://example.com/some-path/', 'restUrl = https://example.com/some-path/',
'license = example-license', 'license = example-license',
@ -27,8 +28,6 @@ class ImportDoesNotUseUploadsFolderTest extends AbstractTest
'restLimit = 3', 'restLimit = 3',
'restMode = next_months,12', 'restMode = next_months,12',
'restTemplate = ET2014A.json', 'restTemplate = ET2014A.json',
'categoriesPid = ',
'categoryParentUid = ',
]); ]);
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
@ -38,11 +37,7 @@ class ImportDoesNotUseUploadsFolderTest extends AbstractTest
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());
self::assertCount(4, $requests, 'Unexpected number of requests were made.'); self::assertCount(4, $requests, 'Unexpected number of requests were made.');

View file

@ -16,6 +16,7 @@ class ImportDoesntBreakWithLongFileTitleTest extends AbstractTest
$fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration; $fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration;
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleImportConfigurationWithCategories.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
@ -25,8 +26,6 @@ class ImportDoesntBreakWithLongFileTitleTest extends AbstractTest
'restLimit = 3', 'restLimit = 3',
'restMode = next_months,12', 'restMode = next_months,12',
'restTemplate = ET2014A.json', 'restTemplate = ET2014A.json',
'categoriesPid = 2',
'categoryParentUid = 2',
]); ]);
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
@ -34,12 +33,7 @@ class ImportDoesntBreakWithLongFileTitleTest extends AbstractTest
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
'region-uid' => '1',
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());

View file

@ -19,6 +19,7 @@ class ImportDoesntEndUpInEndlessDateCreationTest extends AbstractTest
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->setDateAspect(new \DateTimeImmutable('2022-07-01'), new \DateTimeZone('Europe/Berlin')); $this->setDateAspect(new \DateTimeImmutable('2022-07-01'), new \DateTimeZone('Europe/Berlin'));
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/DefaultImportConfiguration.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
@ -28,20 +29,13 @@ class ImportDoesntEndUpInEndlessDateCreationTest extends AbstractTest
'restLimit = 3', 'restLimit = 3',
'restMode = next_months,12', 'restMode = next_months,12',
'restTemplate = ET2014A.json', 'restTemplate = ET2014A.json',
'categoriesPid = 2',
'categoryParentUid = 2',
]); ]);
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithPotentiellyEndlessDateCreation.json') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithPotentiellyEndlessDateCreation.json') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
'region-uid' => '1',
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());

View file

@ -21,6 +21,7 @@ class ImportsExampleAsExpectedTest extends AbstractTest
$fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration; $fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration;
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleImportConfigurationWithCategories.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
@ -30,8 +31,6 @@ class ImportsExampleAsExpectedTest extends AbstractTest
'restLimit = 3', 'restLimit = 3',
'restMode = next_months,12', 'restMode = next_months,12',
'restTemplate = ET2014A.json', 'restTemplate = ET2014A.json',
'categoriesPid = 2',
'categoryParentUid = 2',
]); ]);
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
@ -41,12 +40,7 @@ class ImportsExampleAsExpectedTest extends AbstractTest
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
'region-uid' => '1',
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());

View file

@ -24,9 +24,7 @@ class ImportsFeaturesTest extends AbstractTest
$this->setUpResponses([ $this->setUpResponses([
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithFeatures.json') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithFeatures.json') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'configurationUid' => '1',
], ImportDestinationDataViaConfigruationCommand::class);
$this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsFeaturesAddsNewFeatures.csv'); $this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsFeaturesAddsNewFeatures.csv');

View file

@ -28,7 +28,7 @@ class ImportsFirstDateOfDatesTest extends AbstractTest
{ {
$this->setUpResponses([new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithSingleDate.json') ?: '')]); $this->setUpResponses([new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithSingleDate.json') ?: '')]);
$this->executeCommand(['configurationUid' => '1'], ImportDestinationDataViaConfigruationCommand::class); $this->executeCommand();
$this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsFirstDateOfSingleDate.csv'); $this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsFirstDateOfSingleDate.csv');
self::assertFileEquals( self::assertFileEquals(
@ -45,7 +45,7 @@ class ImportsFirstDateOfDatesTest extends AbstractTest
{ {
$this->setUpResponses([new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithRecurringWeekly.json') ?: '')]); $this->setUpResponses([new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithRecurringWeekly.json') ?: '')]);
$this->executeCommand(['configurationUid' => '1'], ImportDestinationDataViaConfigruationCommand::class); $this->executeCommand();
$this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsFirstDateOfRecurringDatesWeekly.csv'); $this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsFirstDateOfRecurringDatesWeekly.csv');
self::assertFileEquals( self::assertFileEquals(
@ -62,7 +62,7 @@ class ImportsFirstDateOfDatesTest extends AbstractTest
{ {
$this->setUpResponses([new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithRecurringDaily.json') ?: '')]); $this->setUpResponses([new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithRecurringDaily.json') ?: '')]);
$this->executeCommand(['configurationUid' => '1'], ImportDestinationDataViaConfigruationCommand::class); $this->executeCommand();
$this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsFirstDateOfRecurringDatesDaily.csv'); $this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsFirstDateOfRecurringDatesDaily.csv');
self::assertFileEquals( self::assertFileEquals(

View file

@ -41,9 +41,7 @@ class ImportsSingleConfigurationTest extends AbstractTest
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'configurationUid' => '1',
], ImportDestinationDataViaConfigruationCommand::class);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());

View file

@ -21,6 +21,7 @@ class ImportsTicketsTest extends AbstractTest
$fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration; $fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration;
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/DefaultImportConfiguration.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
@ -30,20 +31,13 @@ class ImportsTicketsTest extends AbstractTest
'restLimit = 3', 'restLimit = 3',
'restMode = next_months,12', 'restMode = next_months,12',
'restTemplate = ET2014A.json', 'restTemplate = ET2014A.json',
'categoriesPid = 2',
'categoryParentUid = 2',
]); ]);
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithTickets.json') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithTickets.json') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
'region-uid' => '1',
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());

View file

@ -19,6 +19,8 @@ class ImportsWithLocationsTest extends AbstractTest
$fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration; $fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration;
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/DefaultImportConfiguration.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
'restUrl = https://example.com/some-path/', 'restUrl = https://example.com/some-path/',
'license = example-license', 'license = example-license',
@ -31,12 +33,7 @@ class ImportsWithLocationsTest extends AbstractTest
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithLocations.json') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithLocations.json') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
'region-uid' => '',
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());
$this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithLocations.csv'); $this->assertCSVDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Assertions/ImportsWithLocations.csv');

View file

@ -19,6 +19,7 @@ class ImportsWithoutCategoryIfNotProvidedTest extends AbstractTest
$fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration; $fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration;
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/DefaultImportConfiguration.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleRegion.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
'restUrl = https://example.com/some-path/', 'restUrl = https://example.com/some-path/',
@ -27,8 +28,6 @@ class ImportsWithoutCategoryIfNotProvidedTest extends AbstractTest
'restLimit = 3', 'restLimit = 3',
'restMode = next_months,12', 'restMode = next_months,12',
'restTemplate = ET2014A.json', 'restTemplate = ET2014A.json',
'categoriesPid = ',
'categoryParentUid = ',
]); ]);
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
@ -38,12 +37,7 @@ class ImportsWithoutCategoryIfNotProvidedTest extends AbstractTest
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
'region-uid' => '1',
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());

View file

@ -19,6 +19,7 @@ class ImportsWithoutLocationTest extends AbstractTest
$fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration; $fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration;
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleImportConfigurationWithoutRegion.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
'restUrl = https://example.com/some-path/', 'restUrl = https://example.com/some-path/',
'license = example-license', 'license = example-license',
@ -31,12 +32,7 @@ class ImportsWithoutLocationTest extends AbstractTest
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithoutLocation.json') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ResponseWithoutLocation.json') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
'region-uid' => '',
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());
self::assertCount( self::assertCount(

View file

@ -19,6 +19,7 @@ class ImportsWithoutRegionIfNotProvidedTest extends AbstractTest
$fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration; $fileImportPath = $this->getInstancePath() . '/fileadmin/' . $fileImportPathConfiguration;
GeneralUtility::mkdir_deep($fileImportPath); GeneralUtility::mkdir_deep($fileImportPath);
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleImportConfigurationWithoutRegion.xml');
$this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml'); $this->importDataSet('EXT:events/Tests/Functional/Import/DestinationDataTest/Fixtures/SingleCategory.xml');
$this->setUpConfiguration([ $this->setUpConfiguration([
'restUrl = https://example.com/some-path/', 'restUrl = https://example.com/some-path/',
@ -27,8 +28,6 @@ class ImportsWithoutRegionIfNotProvidedTest extends AbstractTest
'restLimit = 3', 'restLimit = 3',
'restMode = next_months,12', 'restMode = next_months,12',
'restTemplate = ET2014A.json', 'restTemplate = ET2014A.json',
'categoriesPid = 2',
'categoryParentUid = 2',
]); ]);
$requests = &$this->setUpResponses([ $requests = &$this->setUpResponses([
@ -37,12 +36,7 @@ class ImportsWithoutRegionIfNotProvidedTest extends AbstractTest
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''),
new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''), new Response(200, [], file_get_contents(__DIR__ . '/Fixtures/ExampleImage.jpg') ?: ''),
]); ]);
$tester = $this->executeCommand([ $tester = $this->executeCommand();
'storage-pid' => '2',
'rest-experience' => 'beispielstadt',
'files-folder' => $fileImportPathConfiguration,
'region-uid' => '',
]);
self::assertSame(0, $tester->getStatusCode()); self::assertSame(0, $tester->getStatusCode());

View file

@ -34,17 +34,15 @@ use Wrm\Events\Tests\ProphecyTrait;
*/ */
class DateDemandFactoryTest extends TestCase class DateDemandFactoryTest extends TestCase
{ {
use ProphecyTrait;
/** /**
* @test * @test
*/ */
public function canBeCreated(): void public function canBeCreated(): void
{ {
$typoScriptService = $this->prophesize(TypoScriptService::class); $typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory( $subject = new DateDemandFactory(
$typoScriptService->reveal() $typoScriptService
); );
self::assertInstanceOf( self::assertInstanceOf(
@ -58,10 +56,10 @@ class DateDemandFactoryTest extends TestCase
*/ */
public function fromSettingsDoesNotThrowUndefinedArrayKeyWarnings(): void public function fromSettingsDoesNotThrowUndefinedArrayKeyWarnings(): void
{ {
$typoScriptService = $this->prophesize(TypoScriptService::class); $typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory( $subject = new DateDemandFactory(
$typoScriptService->reveal() $typoScriptService
); );
$result = $subject->fromSettings([]); $result = $subject->fromSettings([]);
@ -71,4 +69,408 @@ class DateDemandFactoryTest extends TestCase
$result $result
); );
} }
/**
* @test
*/
public function searchWordIsSetByRequest(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'searchword' => 'This is the search word',
],
[
]
);
self::assertSame(
'This is the search word',
$result->getSearchword()
);
}
/**
* @test
*/
public function synonymsAreSetBySettings(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'searchword' => 'synonym1',
],
[
'synonyms' => [
[
'word' => 'Word1',
'synonyms' => 'synonym1, synonym2',
],
[
'word' => 'Word2',
'synonyms' => 'synonym3, synonym4',
],
[
'word' => 'Word3',
'synonyms' => 'synonym1',
],
],
]
);
self::assertSame(
[
'Word1',
'Word3',
],
$result->getSynonymsForSearchword()
);
}
/**
* @test
*/
public function categoriesAreSetByRequest(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'userCategories' => [
'10', '20',
],
],
[
]
);
self::assertSame(
[
10,
20,
],
$result->getUserCategories()
);
}
/**
* @test
*/
public function featuresAreSetByRequest(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'features' => [
'10', '20',
],
],
[
]
);
self::assertSame(
[
10,
20,
],
$result->getFeatures()
);
}
/**
* @test
*/
public function regionIsSetByRequest(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'region' => '10',
],
[
]
);
self::assertSame(
[
10,
],
$result->getRegions()
);
self::assertSame(
'10',
$result->getRegion()
);
}
/**
* @test
*/
public function regionsAreSetByRequest(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'regions' => [
'10', '20',
],
],
[
]
);
self::assertSame(
[
10,
20,
],
$result->getRegions()
);
self::assertSame(
'10,20',
$result->getRegion()
);
}
/**
* @test
*/
public function startIsSetByRequest(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'start' => '2022-07-12',
],
[
]
);
self::assertInstanceOf(
\DateTimeImmutable::class,
$result->getStartObject()
);
self::assertSame(
'2022-07-12',
$result->getStartObject()->format('Y-m-d')
);
self::assertSame(
'2022-07-12',
$result->getStart()
);
}
/**
* @test
*/
public function endIsSetByRequest(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'end' => '2022-07-12',
],
[
]
);
self::assertInstanceOf(
\DateTimeImmutable::class,
$result->getEndObject()
);
self::assertSame(
'2022-07-12',
$result->getEndObject()->format('Y-m-d')
);
self::assertSame(
'2022-07-12',
$result->getEnd()
);
}
/**
* @test
* @dataProvider possibleEndAndStartNullCombinations
*/
public function returnsEndsOnSameDayIfAnyIsNull(
string $start,
string $end
): void {
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'start' => $start,
'end' => $end,
],
[
]
);
self::assertTrue(
$result->getEndsOnSameDay()
);
}
public function possibleEndAndStartNullCombinations(): \Generator
{
yield 'Both are empty' => [
'start' => '',
'end' => '',
];
yield 'Start is empty' => [
'start' => '',
'end' => '2022-07-12',
];
yield 'End is empty' => [
'start' => '2022-07-12',
'end' => '',
];
}
/**
* @test
*/
public function returnsEndsOnSameDayIfBothAreOnSameDay(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'start' => '2022-07-12',
'end' => '2022-07-12',
],
[
]
);
self::assertTrue(
$result->getEndsOnSameDay()
);
}
/**
* @test
*/
public function returnsEndsOnSameDayIfBothAreOnDifferentDays(): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'start' => '2022-07-12',
'end' => '2022-07-13',
],
[
]
);
self::assertFalse(
$result->getEndsOnSameDay()
);
}
/**
* @test
* @dataProvider possibleSubmittedHighlights
*
* @param mixed $highlight
*/
public function returnsHighlightIfSet($highlight): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'highlight' => $highlight,
],
[
]
);
self::assertTrue($result->getHighlight());
}
public function possibleSubmittedHighlights(): \Generator
{
yield 'true' => ['highlight' => true];
yield '1 as integer' => ['highlight' => 1];
yield '1 as string' => ['highlight' => '1'];
}
/**
* @test
* @dataProvider possibleSubmittedFalsyHighlights
*
* @param mixed $highlight
*/
public function returnsNoHighlightIfNotSet($highlight): void
{
$typoScriptService = $this->createStub(TypoScriptService::class);
$subject = new DateDemandFactory(
$typoScriptService
);
$result = $subject->createFromRequestValues(
[
'highlight' => $highlight,
],
[
]
);
self::assertFalse($result->getHighlight());
}
public function possibleSubmittedFalsyHighlights(): \Generator
{
yield 'false' => ['highlight' => false];
yield '0 as integer' => ['highlight' => 0];
yield '0 as string' => ['highlight' => '0'];
yield 'empty string' => ['highlight' => ''];
}
} }

View file

@ -1,364 +0,0 @@
<?php
namespace Wrm\Events\Tests\Unit\Domain\Model\Dto;
use PHPUnit\Framework\TestCase;
use Wrm\Events\Domain\Model\Dto\DateDemand;
/**
* @covers \Wrm\Events\Domain\Model\Dto\DateDemand
*/
class DateDemandTest extends TestCase
{
/**
* @test
*/
public function canBeCreated(): void
{
$subject = new DateDemand();
self::assertInstanceOf(
DateDemand::class,
$subject
);
}
/**
* @test
*/
public function searchWordIsSetByRequest(): void
{
$result = DateDemand::createFromRequestValues(
[
'searchword' => 'This is the search word',
],
[
]
);
self::assertSame(
'This is the search word',
$result->getSearchword()
);
}
/**
* @test
*/
public function synonymsAreSetBySettings(): void
{
$result = DateDemand::createFromRequestValues(
[
'searchword' => 'synonym1',
],
[
'synonyms' => [
[
'word' => 'Word1',
'synonyms' => 'synonym1, synonym2',
],
[
'word' => 'Word2',
'synonyms' => 'synonym3, synonym4',
],
[
'word' => 'Word3',
'synonyms' => 'synonym1',
],
],
]
);
self::assertSame(
[
'Word1',
'Word3',
],
$result->getSynonymsForSearchword()
);
}
/**
* @test
*/
public function categoriesAreSetByRequest(): void
{
$result = DateDemand::createFromRequestValues(
[
'userCategories' => [
'10', '20',
],
],
[
]
);
self::assertSame(
[
10,
20,
],
$result->getUserCategories()
);
}
/**
* @test
*/
public function featuresAreSetByRequest(): void
{
$result = DateDemand::createFromRequestValues(
[
'features' => [
'10', '20',
],
],
[
]
);
self::assertSame(
[
10,
20,
],
$result->getFeatures()
);
}
/**
* @test
*/
public function regionIsSetByRequest(): void
{
$result = DateDemand::createFromRequestValues(
[
'region' => '10',
],
[
]
);
self::assertSame(
[
10,
],
$result->getRegions()
);
self::assertSame(
'10',
$result->getRegion()
);
}
/**
* @test
*/
public function regionsAreSetByRequest(): void
{
$result = DateDemand::createFromRequestValues(
[
'regions' => [
'10', '20',
],
],
[
]
);
self::assertSame(
[
10,
20,
],
$result->getRegions()
);
self::assertSame(
'10,20',
$result->getRegion()
);
}
/**
* @test
*/
public function startIsSetByRequest(): void
{
$result = DateDemand::createFromRequestValues(
[
'start' => '2022-07-12',
],
[
]
);
self::assertInstanceOf(
\DateTimeImmutable::class,
$result->getStartObject()
);
self::assertSame(
'2022-07-12',
$result->getStartObject()->format('Y-m-d')
);
self::assertSame(
'2022-07-12',
$result->getStart()
);
}
/**
* @test
*/
public function endIsSetByRequest(): void
{
$result = DateDemand::createFromRequestValues(
[
'end' => '2022-07-12',
],
[
]
);
self::assertInstanceOf(
\DateTimeImmutable::class,
$result->getEndObject()
);
self::assertSame(
'2022-07-12',
$result->getEndObject()->format('Y-m-d')
);
self::assertSame(
'2022-07-12',
$result->getEnd()
);
}
/**
* @test
* @dataProvider possibleEndAndStartNullCombinations
*/
public function returnsEndsOnSameDayIfAnyIsNull(
string $start,
string $end
): void {
$result = DateDemand::createFromRequestValues(
[
'start' => $start,
'end' => $end,
],
[
]
);
self::assertTrue(
$result->getEndsOnSameDay()
);
}
public function possibleEndAndStartNullCombinations(): \Generator
{
yield 'Both are empty' => [
'start' => '',
'end' => '',
];
yield 'Start is empty' => [
'start' => '',
'end' => '2022-07-12',
];
yield 'End is empty' => [
'start' => '2022-07-12',
'end' => '',
];
}
/**
* @test
*/
public function returnsEndsOnSameDayIfBothAreOnSameDay(): void
{
$result = DateDemand::createFromRequestValues(
[
'start' => '2022-07-12',
'end' => '2022-07-12',
],
[
]
);
self::assertTrue(
$result->getEndsOnSameDay()
);
}
/**
* @test
*/
public function returnsEndsOnSameDayIfBothAreOnDifferentDays(): void
{
$result = DateDemand::createFromRequestValues(
[
'start' => '2022-07-12',
'end' => '2022-07-13',
],
[
]
);
self::assertFalse(
$result->getEndsOnSameDay()
);
}
/**
* @test
* @dataProvider possibleSubmittedHighlights
*
* @param mixed $highlight
*/
public function returnsHighlightIfSet($highlight): void
{
$result = DateDemand::createFromRequestValues(
[
'highlight' => $highlight,
],
[
]
);
self::assertTrue($result->getHighlight());
}
public function possibleSubmittedHighlights(): \Generator
{
yield 'true' => ['highlight' => true];
yield '1 as integer' => ['highlight' => 1];
yield '1 as string' => ['highlight' => '1'];
}
/**
* @test
* @dataProvider possibleSubmittedFalsyHighlights
*
* @param mixed $highlight
*/
public function returnsNoHighlightIfNotSet($highlight): void
{
$result = DateDemand::createFromRequestValues(
[
'highlight' => $highlight,
],
[
]
);
self::assertFalse($result->getHighlight());
}
public function possibleSubmittedFalsyHighlights(): \Generator
{
yield 'false' => ['highlight' => false];
yield '0 as integer' => ['highlight' => 0];
yield '0 as string' => ['highlight' => '0'];
yield 'empty string' => ['highlight' => ''];
}
}

View file

@ -1,366 +0,0 @@
<?php
declare(strict_types=1);
namespace Wrm\Events\Tests\Unit\Domain\Model\Event;
use PHPUnit\Framework\TestCase;
use Wrm\Events\Domain\Model\Event;
use Wrm\Events\Domain\Model\Location;
/**
* @covers \Wrm\Events\Domain\Model\Event
*/
class LocationDataTest extends TestCase
{
/**
* @test
*/
public function returnsLocationNameFromLegacyProperty(): void
{
$subject = new Event();
$subject->_setProperty('name', 'Location Name');
self::assertSame(
'Location Name',
$subject->getName()
);
}
/**
* @test
*/
public function returnsLocationStreetFromLegacyProperty(): void
{
$subject = new Event();
$subject->_setProperty('street', 'Mußterstraße 24');
self::assertSame(
'Mußterstraße 24',
$subject->getStreet()
);
}
/**
* @test
*/
public function returnsLocationDistrictFromLegacyProperty(): void
{
$subject = new Event();
$subject->_setProperty('district', 'NRW');
self::assertSame(
'NRW',
$subject->getDistrict()
);
}
/**
* @test
*/
public function returnsLocationCityFromLegacyProperty(): void
{
$subject = new Event();
$subject->_setProperty('city', 'Weimar');
self::assertSame(
'Weimar',
$subject->getCity()
);
}
/**
* @test
*/
public function returnsLocationZipFromLegacyProperty(): void
{
$subject = new Event();
$subject->_setProperty('zip', '41367');
self::assertSame(
'41367',
$subject->getZip()
);
}
/**
* @test
*/
public function returnsLocationCountryFromLegacyProperty(): void
{
$subject = new Event();
$subject->_setProperty('country', 'Germany');
self::assertSame(
'Germany',
$subject->getCountry()
);
}
/**
* @test
*/
public function returnsLocationPhoneFromLegacyProperty(): void
{
$subject = new Event();
$subject->_setProperty('phone', '+49 2161 333 333 333');
self::assertSame(
'+49 2161 333 333 333',
$subject->getPhone()
);
}
/**
* @test
*/
public function returnsLocationLatitudeFromLegacyProperty(): void
{
$subject = new Event();
$subject->_setProperty('latitude', '50.720971023259');
self::assertSame(
'50.720971023259',
$subject->getLatitude()
);
}
/**
* @test
*/
public function returnsLocationLongitudeFromLegacyProperty(): void
{
$subject = new Event();
$subject->_setProperty('longitude', '11.335229873657');
self::assertSame(
'11.335229873657',
$subject->getLongitude()
);
}
/**
* @test
*/
public function returnsLocationNameFromLocation(): void
{
$subject = new Event();
$subject->setLocation(new Location(
'Location Name',
'',
'',
'',
'',
'',
'',
'',
'',
-1
));
self::assertSame(
'Location Name',
$subject->getName()
);
}
/**
* @test
*/
public function returnsLocationStreetFromLocation(): void
{
$subject = new Event();
$subject->setLocation(new Location(
'',
'Mußterstraße 24',
'',
'',
'',
'',
'',
'',
'',
-1
));
self::assertSame(
'Mußterstraße 24',
$subject->getStreet()
);
}
/**
* @test
*/
public function returnsLocationDistrictFromLocation(): void
{
$subject = new Event();
$subject->setLocation(new Location(
'',
'',
'',
'',
'NRW',
'',
'',
'',
'',
-1
));
self::assertSame(
'NRW',
$subject->getDistrict()
);
}
/**
* @test
*/
public function returnsLocationCityFromLocation(): void
{
$subject = new Event();
$subject->setLocation(new Location(
'',
'',
'',
'Weimar',
'',
'',
'',
'',
'',
-1
));
self::assertSame(
'Weimar',
$subject->getCity()
);
}
/**
* @test
*/
public function returnsLocationZipFromLocation(): void
{
$subject = new Event();
$subject->setLocation(new Location(
'',
'',
'41367',
'',
'',
'',
'',
'',
'',
-1
));
self::assertSame(
'41367',
$subject->getZip()
);
}
/**
* @test
*/
public function returnsLocationCountryFromLocation(): void
{
$subject = new Event();
$subject->setLocation(new Location(
'',
'',
'',
'',
'',
'Germany',
'',
'',
'',
-1
));
self::assertSame(
'Germany',
$subject->getCountry()
);
}
/**
* @test
*/
public function returnsLocationPhoneFromLocation(): void
{
$subject = new Event();
$subject->setLocation(new Location(
'',
'',
'',
'',
'',
'',
'+49 2161 333 333 333',
'',
'',
-1
));
self::assertSame(
'+49 2161 333 333 333',
$subject->getPhone()
);
}
/**
* @test
*/
public function returnsLocationLatitudeFromLocation(): void
{
$subject = new Event();
$subject->setLocation(new Location(
'',
'',
'',
'',
'',
'',
'',
'50.720971023259',
'',
-1
));
self::assertSame(
'50.720971023259',
$subject->getLatitude()
);
}
/**
* @test
*/
public function returnsLocationLongitudeFromLocation(): void
{
$subject = new Event();
$subject->setLocation(new Location(
'',
'',
'',
'',
'',
'',
'',
'',
'11.335229873657',
-1
));
self::assertSame(
'11.335229873657',
$subject->getLongitude()
);
}
}

View file

@ -11,20 +11,11 @@ CREATE TABLE tx_events_domain_model_event (
teaser text, teaser text,
details text, details text,
price_info text, price_info text,
name varchar(255) DEFAULT '' NOT NULL,
street varchar(255) DEFAULT '' NOT NULL,
district varchar(255) DEFAULT '' NOT NULL,
city varchar(255) DEFAULT '' NOT NULL,
zip varchar(255) DEFAULT '' NOT NULL,
country varchar(255) DEFAULT '' NOT NULL,
web varchar(255) DEFAULT '' NOT NULL, web varchar(255) DEFAULT '' NOT NULL,
phone varchar(255) DEFAULT '' NOT NULL,
ticket text, ticket text,
facebook varchar(255) DEFAULT '' NOT NULL, facebook varchar(255) DEFAULT '' NOT NULL,
youtube varchar(255) DEFAULT '' NOT NULL, youtube varchar(255) DEFAULT '' NOT NULL,
instagram varchar(255) DEFAULT '' NOT NULL, instagram varchar(255) DEFAULT '' NOT NULL,
latitude varchar(255) DEFAULT '' NOT NULL,
longitude varchar(255) DEFAULT '' NOT NULL,
images int(11) unsigned NOT NULL default '0', images int(11) unsigned NOT NULL default '0',
categories int(11) DEFAULT '0' NOT NULL, categories int(11) DEFAULT '0' NOT NULL,
features int(11) DEFAULT '0' NOT NULL, features int(11) DEFAULT '0' NOT NULL,

View file

@ -13,11 +13,6 @@ parameters:
count: 1 count: 1
path: Classes/Domain/DestinationData/ImportFactory.php path: Classes/Domain/DestinationData/ImportFactory.php
-
message: "#^Parameter \\#1 \\$min \\(999\\) of function random_int expects lower number than parameter \\#2 \\$max \\(int\\<1, max\\>\\)\\.$#"
count: 1
path: Classes/Domain/DestinationData/LegacyImportFactory.php
- -
message: "#^Call to method deleteFile\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Storage\\.$#" message: "#^Call to method deleteFile\\(\\) on an unknown class TYPO3\\\\CMS\\\\Core\\\\Resource\\\\Storage\\.$#"
count: 1 count: 1