From 00c19be760412bdd9eaac0053814a6c9a7945bcd Mon Sep 17 00:00:00 2001 From: Christian Kuhn <lolli@schwarzbu.ch> Date: Sat, 27 Nov 2021 16:18:54 +0100 Subject: [PATCH] [TASK] Streamline DataHandler functional tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Obsolete importScenarioDataSet() by using importCSVDataSet() directly with absolute paths. IDE's now resolve these paths so they can be clicked to open, which is *much* more convenient when working with the .csv files. * Similar, obsolete assertAssertionDataSet() by using assertCSVDataSet() directly. * Protected constants. * Late static binding for workspace init in setUp() to simplify and streamline workspace test inheritance. * A couple of minor streamlinings. Change-Id: I9e814335b863da278e814641f6995a24778da95b Resolves: #96104 Releases: master, 11.5 Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/72326 Tested-by: Stefan Bürk <stefan@buerk.tech> Tested-by: core-ci <typo3@b13.com> Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de> Reviewed-by: Stefan Bürk <stefan@buerk.tech> Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de> --- .../Page/LocalizationControllerTest.php | 21 +-- .../AbstractDataHandlerActionTestCase.php | 58 +------ .../ManyToMany/AbstractActionTestCase.php | 7 +- .../Category/ManyToMany/Modify/ActionTest.php | 31 ++-- .../OneToMany/AbstractActionTestCase.php | 9 +- .../Category/OneToMany/Modify/ActionTest.php | 31 ++-- .../OneToOne/AbstractActionTestCase.php | 9 +- .../Category/OneToOne/Modify/ActionTest.php | 25 ++- .../DataHandler/DefaultValuesTest.php | 14 +- .../DeleteTranslatedSubpagesTest.php | 7 +- .../DataHandler/GetUniqueTranslationTest.php | 14 +- .../DataHandling/DataHandler/HookTest.php | 23 ++- .../DataResolving/PlainDataResolverTest.php | 7 +- .../FAL/AbstractActionTestCase.php | 53 +++---- .../DataHandling/FAL/Modify/ActionTest.php | 33 ++-- .../DataHandling/Flexform/ActionTest.php | 14 +- .../DataHandling/FlexformIrre/ActionTest.php | 12 +- .../Group/AbstractActionTestCase.php | 31 ++-- .../DataHandling/Group/Modify/ActionTest.php | 47 +++--- .../IRRE/CSV/AbstractActionTestCase.php | 49 +++--- .../IRRE/CSV/Modify/ActionTest.php | 69 ++++---- .../ForeignField/AbstractActionTestCase.php | 53 +++---- .../IRRE/ForeignField/Modify/ActionTest.php | 81 +++++----- .../ManyToMany/AbstractActionTestCase.php | 43 +++-- .../ManyToMany/Modify/ActionTest.php | 45 +++--- .../Regular/AbstractActionTestCase.php | 40 +++-- .../DataHandling/Regular/CheckValueTest.php | 7 +- ...hp => CheckValueTestForCheckboxesTest.php} | 10 +- ...ct.php => CheckValueTestForSelectTest.php} | 10 +- .../Regular/Hooks/PagesTsConfigGuardTest.php | 33 +--- .../Regular/Modify/ActionTest.php | 123 +++++++-------- .../Regular/MultiSite/MultiSiteTest.php | 20 +-- .../Regular/PagePermissionTest.php | 7 +- .../Select/AbstractActionTestCase.php | 29 ++-- .../DataHandling/Select/Modify/ActionTest.php | 43 +++-- .../SelectFlex/AbstractActionTestCase.php | 7 +- .../SelectFlex/Modify/ActionTest.php | 7 +- .../DataHandling/Slug/SlugHelperTest.php | 7 +- .../Slug/SlugHelperUniqueTest.php | 7 +- .../Persistence/TranslatedSiteContentTest.php | 10 +- .../LocalizedSiteContentRenderingTest.php | 9 +- .../Recycle/Pages/AdminRecycleTest.php | 11 +- .../Recycle/Pages/UserRecycleTest.php | 11 +- .../FAL/AbstractActionTestCase.php | 16 +- .../DataHandling/FAL/Discard/ActionTest.php | 31 ++-- .../DataHandling/FAL/Modify/ActionTest.php | 31 ++-- .../DataHandling/FAL/Publish/ActionTest.php | 31 ++-- .../FAL/PublishAll/ActionTest.php | 31 ++-- .../Group/AbstractActionTestCase.php | 16 +- .../DataHandling/Group/Discard/ActionTest.php | 41 +++-- .../DataHandling/Group/Modify/ActionTest.php | 39 ++--- .../DataHandling/Group/Publish/ActionTest.php | 39 ++--- .../Group/PublishAll/ActionTest.php | 39 ++--- .../IRRE/CSV/AbstractActionTestCase.php | 16 +- .../IRRE/CSV/Discard/ActionTest.php | 53 +++---- .../IRRE/CSV/Modify/ActionTest.php | 53 +++---- .../IRRE/CSV/Publish/ActionTest.php | 51 +++--- .../IRRE/CSV/PublishAll/ActionTest.php | 51 +++--- .../ForeignField/AbstractActionTestCase.php | 16 +- .../IRRE/ForeignField/Discard/ActionTest.php | 53 +++---- .../IRRE/ForeignField/Modify/ActionTest.php | 57 +++---- .../IRRE/ForeignField/Publish/ActionTest.php | 51 +++--- .../ForeignField/PublishAll/ActionTest.php | 51 +++--- .../ManyToMany/AbstractActionTestCase.php | 18 +-- .../ManyToMany/Discard/ActionTest.php | 45 +++--- .../ManyToMany/Modify/ActionTest.php | 45 +++--- .../ManyToMany/Publish/ActionTest.php | 45 +++--- .../ManyToMany/PublishAll/ActionTest.php | 45 +++--- .../Regular/AbstractActionTestCase.php | 28 +--- .../Regular/Discard/ActionTest.php | 117 +++++++------- .../Regular/Modify/ActionTest.php | 149 +++++++++--------- .../Regular/Publish/ActionTest.php | 111 +++++++------ .../Regular/PublishAll/ActionTest.php | 117 +++++++------- .../Select/AbstractActionTestCase.php | 16 +- .../Select/Discard/ActionTest.php | 39 ++--- .../DataHandling/Select/Modify/ActionTest.php | 39 ++--- .../Select/Publish/ActionTest.php | 39 ++--- .../Select/PublishAll/ActionTest.php | 39 ++--- .../SelectFlex/AbstractActionTestCase.php | 18 +-- .../SelectFlex/Discard/ActionTest.php | 7 +- .../SelectFlex/Modify/ActionTest.php | 7 +- .../SelectFlex/Publish/ActionTest.php | 7 +- .../SelectFlex/PublishAll/ActionTest.php | 7 +- .../Functional/Hook/DataHandlerHookTest.php | 71 +-------- 84 files changed, 1183 insertions(+), 1769 deletions(-) rename typo3/sysext/core/Tests/Functional/DataHandling/Regular/{CheckValueTestForCheckboxes.php => CheckValueTestForCheckboxesTest.php} (87%) rename typo3/sysext/core/Tests/Functional/DataHandling/Regular/{CheckValueTestForSelect.php => CheckValueTestForSelectTest.php} (87%) diff --git a/typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php b/typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php index ad198349c083..7f8e2f5b9aaa 100644 --- a/typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php +++ b/typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php @@ -18,6 +18,7 @@ declare(strict_types=1); namespace TYPO3\CMS\Backend\Tests\Functional\Controller\Page; use TYPO3\CMS\Backend\Controller\Page\LocalizationController; +use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; use TYPO3\CMS\Core\DataHandling\DataHandler; use TYPO3\CMS\Core\Http\ServerRequest; use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCase; @@ -27,20 +28,12 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa */ class LocalizationControllerTest extends AbstractDataHandlerActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/backend/Tests/Functional/Controller/Page/Localization/CSV/DataSet/'; - /** * @var LocalizationController|\PHPUnit\Framework\MockObject\MockObject */ protected $subject; - /** - * @var \TYPO3\CMS\Core\Authentication\BackendUserAuthentication - */ - protected $backendUser; + protected BackendUserAuthentication $backendUser; /** * @var array @@ -77,7 +70,7 @@ class LocalizationControllerTest extends AbstractDataHandlerActionTestCase 'action' => LocalizationController::ACTION_LOCALIZE, ]; $this->subject->_call('process', $params); - $this->assertAssertionDataSet('TranslatedFromDefault'); + $this->assertCSVDataSet(__DIR__ . '/Localization/CSV/DataSet/TranslatedFromDefault.csv'); } /** @@ -95,7 +88,7 @@ class LocalizationControllerTest extends AbstractDataHandlerActionTestCase 'action' => LocalizationController::ACTION_LOCALIZE, ]; $this->subject->_call('process', $params); - $this->assertAssertionDataSet('TranslatedFromTranslation'); + $this->assertCSVDataSet(__DIR__ . '/Localization/CSV/DataSet/TranslatedFromTranslation.csv'); } /** @@ -111,7 +104,7 @@ class LocalizationControllerTest extends AbstractDataHandlerActionTestCase 'action' => LocalizationController::ACTION_COPY, ]; $this->subject->_call('process', $params); - $this->assertAssertionDataSet('CopiedFromDefault'); + $this->assertCSVDataSet(__DIR__ . '/Localization/CSV/DataSet/CopiedFromDefault.csv'); } /** @@ -129,7 +122,7 @@ class LocalizationControllerTest extends AbstractDataHandlerActionTestCase 'action' => LocalizationController::ACTION_COPY, ]; $this->subject->_call('process', $params); - $this->assertAssertionDataSet('CopiedFromTranslation'); + $this->assertCSVDataSet(__DIR__ . '/Localization/CSV/DataSet/CopiedFromTranslation.csv'); } /** @@ -181,7 +174,7 @@ class LocalizationControllerTest extends AbstractDataHandlerActionTestCase 'action' => LocalizationController::ACTION_COPY, ]; $this->subject->_call('process', $params); - $this->assertAssertionDataSet('CreatedElementOrdering'); + $this->assertCSVDataSet(__DIR__ . '/Localization/CSV/DataSet/CreatedElementOrdering.csv'); } /** diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php index 1c65ffc0e806..44fe5749ee69 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php @@ -18,6 +18,7 @@ declare(strict_types=1); namespace TYPO3\CMS\Core\Tests\Functional\DataHandling; use Symfony\Component\Yaml\Yaml; +use TYPO3\CMS\Core\Authentication\BackendUserAuthentication; use TYPO3\CMS\Core\Cache\CacheManager; use TYPO3\CMS\Core\Context\Context; use TYPO3\CMS\Core\Context\WorkspaceAspect; @@ -37,17 +38,8 @@ use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; */ abstract class AbstractDataHandlerActionTestCase extends FunctionalTestCase { - const VALUE_BackendUserId = 1; - - /** - * @var string - */ - protected $scenarioDataSetDirectory; - - /** - * @var string - */ - protected $assertionDataSetDirectory; + protected const VALUE_BackendUserId = 1; + protected const VALUE_WorkspaceId = 0; /** * If this value is NULL, log entries are not considered. @@ -69,15 +61,8 @@ abstract class AbstractDataHandlerActionTestCase extends FunctionalTestCase */ protected $recordIds = []; - /** - * @var ActionService - */ - protected $actionService; - - /** - * @var \TYPO3\CMS\Core\Authentication\BackendUserAuthentication - */ - protected $backendUser; + protected ActionService $actionService; + protected BackendUserAuthentication $backendUser; /** * Default Site Configuration @@ -115,10 +100,10 @@ abstract class AbstractDataHandlerActionTestCase extends FunctionalTestCase parent::setUp(); $this->backendUser = $this->setUpBackendUserFromFixture(self::VALUE_BackendUserId); - // By default make tests on live workspace - $this->setWorkspaceId(0); + // Note late static binding - Workspace related tests override the constant + $this->setWorkspaceId(static::VALUE_WorkspaceId); - $this->actionService = $this->getActionService(); + $this->actionService = new ActionService(); Bootstrap::initializeLanguageObject(); } @@ -183,33 +168,6 @@ abstract class AbstractDataHandlerActionTestCase extends FunctionalTestCase GeneralUtility::makeInstance(Context::class)->setAspect('workspace', new WorkspaceAspect($workspaceId)); } - /** - * @return ActionService - */ - protected function getActionService(): ActionService - { - return GeneralUtility::makeInstance( - ActionService::class - ); - } - - /** - * @param string $dataSetName - */ - protected function importScenarioDataSet($dataSetName): void - { - $fileName = rtrim($this->scenarioDataSetDirectory, '/') . '/' . $dataSetName . '.csv'; - $fileName = GeneralUtility::getFileAbsFileName($fileName); - $this->importCSVDataSet($fileName); - } - - protected function assertAssertionDataSet($dataSetName): void - { - $fileName = rtrim($this->assertionDataSetDirectory, '/') . '/' . $dataSetName . '.csv'; - $fileName = GeneralUtility::getFileAbsFileName($fileName); - $this->assertCSVDataSet($fileName); - } - /** * Asserts correct number of warning and error log entries. * diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/AbstractActionTestCase.php index 3f756ea0d4b8..e6c1962d7298 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/AbstractActionTestCase.php @@ -39,10 +39,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected const FIELD_Categories = 'categories'; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', @@ -51,7 +48,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/Modify/ActionTest.php index 82984ebcc41d..1897a746092e 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/Modify/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Category/ManyToMany/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelation(): void { parent::addCategoryRelation(); - $this->assertAssertionDataSet('addCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -67,7 +62,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelations(): void { parent::addCategoryRelations(); - $this->assertAssertionDataSet('addCategoryRelations'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelations.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -87,7 +82,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelationToExisting(): void { parent::addCategoryRelationToExisting(); - $this->assertAssertionDataSet('addCategoryRelationToExisting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelationToExisting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -107,7 +102,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelationsToExisting(): void { parent::addCategoryRelationsToExisting(); - $this->assertAssertionDataSet('addCategoryRelationsToExisting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelationsToExisting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -127,7 +122,7 @@ class ActionTest extends AbstractActionTestCase public function createAndAddCategoryRelation(): void { parent::createAndAddCategoryRelation(); - $this->assertAssertionDataSet('createAndAddCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createAndAddCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -160,7 +155,7 @@ class ActionTest extends AbstractActionTestCase public function createAndReplaceCategoryRelation(): void { parent::createAndReplaceCategoryRelation(); - $this->assertAssertionDataSet('createAndReplaceCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createAndReplaceCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -186,7 +181,7 @@ class ActionTest extends AbstractActionTestCase public function addAndDeleteCategoryRelationsOnExisting(): void { parent::addAndDeleteCategoryRelationsOnExisting(); - $this->assertAssertionDataSet('addAndDeleteCategoryRelationsOnExisting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addAndDeleteCategoryRelationsOnExisting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -206,7 +201,7 @@ class ActionTest extends AbstractActionTestCase public function modifyReferencingContentElement(): void { parent::modifyReferencingContentElement(); - $this->assertAssertionDataSet('modifyReferencingContentElement'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyReferencingContentElement.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -225,7 +220,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentOfRelatedCategory(): void { parent::modifyContentOfRelatedCategory(); - $this->assertAssertionDataSet('modifyContentOfRelatedCategory'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelatedCategory.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -245,7 +240,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentAndCategoryRelationToDifferentPage(): void { parent::moveContentAndCategoryRelationToDifferentPage(); - $this->assertAssertionDataSet('moveContentAndCategoryRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentAndCategoryRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_TargetPageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -265,7 +260,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentAndCategorySorting(): void { parent::changeContentAndCategorySorting(); - $this->assertAssertionDataSet('changeContentAndCategorySorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentAndCategorySorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -285,7 +280,7 @@ class ActionTest extends AbstractActionTestCase public function deleteCategoryRelation(): void { parent::deleteCategoryRelation(); - $this->assertAssertionDataSet('deleteCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -312,7 +307,7 @@ class ActionTest extends AbstractActionTestCase public function deleteCategoryRelations(): void { parent::deleteCategoryRelations(); - $this->assertAssertionDataSet('deleteCategoryRelations'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelations.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/AbstractActionTestCase.php index 7d6e15ab609b..9f25ab8d7ee5 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/AbstractActionTestCase.php @@ -39,19 +39,16 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected const FIELD_Categories = 'tx_testdatahandler_categories'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; + protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler', ]; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/DataSet/'; - protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/Modify/ActionTest.php index 81109b36d821..bc61711e2b96 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/Modify/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToMany/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelation(): void { parent::addCategoryRelation(); - $this->assertAssertionDataSet('addCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -67,7 +62,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelations(): void { parent::addCategoryRelations(); - $this->assertAssertionDataSet('addCategoryRelations'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelations.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -87,7 +82,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelationToExisting(): void { parent::addCategoryRelationToExisting(); - $this->assertAssertionDataSet('addCategoryRelationToExisting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelationToExisting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -107,7 +102,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelationsToExisting(): void { parent::addCategoryRelationsToExisting(); - $this->assertAssertionDataSet('addCategoryRelationsToExisting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelationsToExisting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -127,7 +122,7 @@ class ActionTest extends AbstractActionTestCase public function createAndAddCategoryRelation(): void { parent::createAndAddCategoryRelation(); - $this->assertAssertionDataSet('createAndAddCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createAndAddCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -160,7 +155,7 @@ class ActionTest extends AbstractActionTestCase public function createAndReplaceCategoryRelation(): void { parent::createAndReplaceCategoryRelation(); - $this->assertAssertionDataSet('createAndReplaceCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createAndReplaceCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -186,7 +181,7 @@ class ActionTest extends AbstractActionTestCase public function addAndDeleteCategoryRelationsOnExisting(): void { parent::addAndDeleteCategoryRelationsOnExisting(); - $this->assertAssertionDataSet('addAndDeleteCategoryRelationsOnExisting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addAndDeleteCategoryRelationsOnExisting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -206,7 +201,7 @@ class ActionTest extends AbstractActionTestCase public function modifyReferencingContentElement(): void { parent::modifyReferencingContentElement(); - $this->assertAssertionDataSet('modifyReferencingContentElement'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyReferencingContentElement.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -225,7 +220,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentOfRelatedCategory(): void { parent::modifyContentOfRelatedCategory(); - $this->assertAssertionDataSet('modifyContentOfRelatedCategory'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelatedCategory.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -245,7 +240,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentAndCategoryRelationToDifferentPage(): void { parent::moveContentAndCategoryRelationToDifferentPage(); - $this->assertAssertionDataSet('moveContentAndCategoryRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentAndCategoryRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_TargetPageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -265,7 +260,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentAndCategorySorting(): void { parent::changeContentAndCategorySorting(); - $this->assertAssertionDataSet('changeContentAndCategorySorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentAndCategorySorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -285,7 +280,7 @@ class ActionTest extends AbstractActionTestCase public function deleteCategoryRelation(): void { parent::deleteCategoryRelation(); - $this->assertAssertionDataSet('deleteCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -312,7 +307,7 @@ class ActionTest extends AbstractActionTestCase public function deleteCategoryRelations(): void { parent::deleteCategoryRelations(); - $this->assertAssertionDataSet('deleteCategoryRelations'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelations.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/AbstractActionTestCase.php index 80fcb34fc1f8..94ff407e0780 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/AbstractActionTestCase.php @@ -39,20 +39,17 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected const FIELD_Category = 'tx_testdatahandler_category'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; + protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler', ]; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/DataSet/'; - protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/Modify/ActionTest.php index 5ba1c69e0c40..90b0ced6e8f3 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/Modify/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Category/OneToOne/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelation(): void { parent::addCategoryRelation(); - $this->assertAssertionDataSet('addCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -67,7 +62,7 @@ class ActionTest extends AbstractActionTestCase public function createAndAddCategoryRelation(): void { parent::createAndAddCategoryRelation(); - $this->assertAssertionDataSet('createAndAddCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createAndAddCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -93,7 +88,7 @@ class ActionTest extends AbstractActionTestCase public function createAndReplaceCategoryRelation(): void { parent::createAndReplaceCategoryRelation(); - $this->assertAssertionDataSet('createAndReplaceCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createAndReplaceCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -119,7 +114,7 @@ class ActionTest extends AbstractActionTestCase public function changeExistingCategoryRelation(): void { parent::changeExistingCategoryRelation(); - $this->assertAssertionDataSet('changeExistingCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeExistingCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -139,7 +134,7 @@ class ActionTest extends AbstractActionTestCase public function modifyReferencingContentElement(): void { parent::modifyReferencingContentElement(); - $this->assertAssertionDataSet('modifyReferencingContentElement'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyReferencingContentElement.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -158,7 +153,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentOfRelatedCategory(): void { parent::modifyContentOfRelatedCategory(); - $this->assertAssertionDataSet('modifyContentOfRelatedCategory'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelatedCategory.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -178,7 +173,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentAndCategoryRelationToDifferentPage(): void { parent::moveContentAndCategoryRelationToDifferentPage(); - $this->assertAssertionDataSet('moveContentAndCategoryRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentAndCategoryRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_TargetPageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -198,7 +193,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentAndCategorySorting(): void { parent::changeContentAndCategorySorting(); - $this->assertAssertionDataSet('changeContentAndCategorySorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentAndCategorySorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -218,7 +213,7 @@ class ActionTest extends AbstractActionTestCase public function copyContentAndCategoryRelation(): void { parent::copyContentAndCategoryRelation(); - $this->assertAssertionDataSet('copyContentAndCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentAndCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -237,7 +232,7 @@ class ActionTest extends AbstractActionTestCase public function deleteCategoryRelation(): void { parent::deleteCategoryRelation(); - $this->assertAssertionDataSet('deleteCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DefaultValuesTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DefaultValuesTest.php index 0e7f1d904e1b..d92da1a3ba89 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DefaultValuesTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DefaultValuesTest.php @@ -26,15 +26,7 @@ use TYPO3\CMS\Core\Utility\ExtensionManagementUtility; */ class DefaultValuesTest extends AbstractDataHandlerActionTestCase { - /** - * @var int - */ - const PAGE_DATAHANDLER = 88; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DataSet/'; + protected const PAGE_DATAHANDLER = 88; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield', @@ -44,8 +36,8 @@ class DefaultValuesTest extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('LiveDefaultPages'); - $this->importScenarioDataSet('LiveDefaultElements'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultPages.csv'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultElements.csv'); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->backendUser->workspace = 0; } diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DeleteTranslatedSubpagesTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DeleteTranslatedSubpagesTest.php index 28a12b42055d..c77bd5d4352c 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DeleteTranslatedSubpagesTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DeleteTranslatedSubpagesTest.php @@ -26,11 +26,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; */ class DeleteTranslatedSubpagesTest extends AbstractDataHandlerActionTestCase { - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DataSet/'; - protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', ]; @@ -38,7 +33,7 @@ class DeleteTranslatedSubpagesTest extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('TranslatedSubpages'); + $this->importCSVDataSet(__DIR__ . '/DataSet/TranslatedSubpages.csv'); $this->backendUser->workspace = 0; } diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/GetUniqueTranslationTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/GetUniqueTranslationTest.php index b7979cb0e029..ba1dae392e1d 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/GetUniqueTranslationTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/GetUniqueTranslationTest.php @@ -22,15 +22,7 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa class GetUniqueTranslationTest extends AbstractDataHandlerActionTestCase { - /** - * @var int - */ - const PAGE_DATAHANDLER = 88; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DataSet/'; + protected const PAGE_DATAHANDLER = 88; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield', @@ -40,8 +32,8 @@ class GetUniqueTranslationTest extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('LiveDefaultPages'); - $this->importScenarioDataSet('LiveDefaultElements'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultPages.csv'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultElements.csv'); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->backendUser->workspace = 0; } diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/HookTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/HookTest.php index 37a77202e007..6f1ce009d1a6 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/HookTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/HookTest.php @@ -27,24 +27,19 @@ use TYPO3\CMS\Core\Utility\StringUtility; */ class HookTest extends AbstractDataHandlerActionTestCase { - const VALUE_PageId = 89; - const VALUE_ContentId = 297; - const TABLE_Content = 'tt_content'; - const TABLE_Hotel = 'tx_testirreforeignfield_hotel'; - const TABLE_Category = 'sys_category'; - const FIELD_ContentHotel = 'tx_testirreforeignfield_hotels'; - const FIELD_Categories = 'categories'; + protected const VALUE_PageId = 89; + protected const VALUE_ContentId = 297; + protected const TABLE_Content = 'tt_content'; + protected const TABLE_Hotel = 'tx_testirreforeignfield_hotel'; + protected const TABLE_Category = 'sys_category'; + protected const FIELD_ContentHotel = 'tx_testirreforeignfield_hotels'; + protected const FIELD_Categories = 'categories'; /** * @var HookFixture */ protected $hookFixture; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/DataHandler/DataSet/'; - protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield', 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', @@ -53,8 +48,8 @@ class HookTest extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('LiveDefaultPages'); - $this->importScenarioDataSet('LiveDefaultElements'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultPages.csv'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultElements.csv'); $this->backendUser->workspace = 0; $this->hookFixture = GeneralUtility::makeInstance(HookFixture::class); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/DataResolving/PlainDataResolverTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/DataResolving/PlainDataResolverTest.php index 52bd71f9fd4d..d244a37793d0 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/DataResolving/PlainDataResolverTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/DataResolving/PlainDataResolverTest.php @@ -22,11 +22,6 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa class PlainDataResolverTest extends AbstractDataHandlerActionTestCase { - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/DataResolving/DataSet/'; - protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', ]; @@ -34,7 +29,7 @@ class PlainDataResolverTest extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('Pages'); + $this->importCSVDataSet(__DIR__ . '/DataSet/Pages.csv'); } /** diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php index f1aa8062bf43..e6d9a3e0ce67 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php @@ -24,33 +24,30 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa */ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase { - const VALUE_PageId = 89; - const VALUE_PageIdTarget = 90; - const VALUE_PageIdWebsite = 1; - const VALUE_ContentIdFirst = 330; - const VALUE_ContentIdLast = 331; - const VALUE_FileIdFirst = 1; - const VALUE_FileIdLast = 21; - const VALUE_LanguageId = 1; - - const VALUE_FileReferenceContentFirstFileFirst = 126; - const VALUE_FileReferenceContentFirstFileLast = 127; - const VALUE_FileReferenceContentLastFileLast = 128; - const VALUE_FileReferenceContentLastFileFirst = 129; - - const TABLE_Page = 'pages'; - const TABLE_Content = 'tt_content'; - const TABLE_File = 'sys_file'; - const TABLE_FileMetadata = 'sys_file_metadata'; - const TABLE_FileReference = 'sys_file_reference'; - - const FIELD_ContentImage = 'image'; - const FIELD_FileReferenceImage = 'uid_local'; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/FAL/DataSet/'; + protected const VALUE_PageId = 89; + protected const VALUE_PageIdTarget = 90; + protected const VALUE_PageIdWebsite = 1; + protected const VALUE_ContentIdFirst = 330; + protected const VALUE_ContentIdLast = 331; + protected const VALUE_FileIdFirst = 1; + protected const VALUE_FileIdLast = 21; + protected const VALUE_LanguageId = 1; + + protected const VALUE_FileReferenceContentFirstFileFirst = 126; + protected const VALUE_FileReferenceContentFirstFileLast = 127; + protected const VALUE_FileReferenceContentLastFileLast = 128; + protected const VALUE_FileReferenceContentLastFileFirst = 129; + + protected const TABLE_Page = 'pages'; + protected const TABLE_Content = 'tt_content'; + protected const TABLE_File = 'sys_file'; + protected const TABLE_FileMetadata = 'sys_file_metadata'; + protected const TABLE_FileReference = 'sys_file_reference'; + + protected const FIELD_ContentImage = 'image'; + protected const FIELD_FileReferenceImage = 'uid_local'; + + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', @@ -59,7 +56,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml'); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php index 0251457f1200..f15375624a96 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/FAL/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContent(): void { parent::modifyContent(); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContent(): void { parent::deleteContent(); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -82,7 +77,7 @@ class ActionTest extends AbstractActionTestCase public function copyContent(): void { parent::copyContent(); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -102,7 +97,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::copyContentToLanguage(); - $this->assertAssertionDataSet('copyContentToLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguage.csv'); $languageConfiguration = $this->siteLanguageConfiguration; $languageConfiguration[1]['fallbackType'] = 'free'; @@ -124,7 +119,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContent(): void { parent::localizeContent(); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -143,7 +138,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSorting(): void { parent::changeContentSorting(); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -164,7 +159,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentToDifferentPage(): void { parent::moveContentToDifferentPage(); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSectionsSource = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -189,7 +184,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentToDifferentPageAndChangeSorting(): void { parent::moveContentToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -214,7 +209,7 @@ class ActionTest extends AbstractActionTestCase public function createContentWithFileReference(): void { parent::createContentWithFileReference(); - $this->assertAssertionDataSet('createContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -232,7 +227,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentWithFileReference(): void { parent::modifyContentWithFileReference(); - $this->assertAssertionDataSet('modifyContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentWFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -250,7 +245,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentAndAddFileReference(): void { parent::modifyContentAndAddFileReference(); - $this->assertAssertionDataSet('modifyContentNAddFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNAddFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -266,7 +261,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentAndDeleteFileReference(): void { parent::modifyContentAndDeleteFileReference(); - $this->assertAssertionDataSet('modifyContentNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -285,7 +280,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentAndDeleteAllFileReference(): void { parent::modifyContentAndDeleteAllFileReference(); - $this->assertAssertionDataSet('modifyContentNDeleteAllFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteAllFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -300,7 +295,7 @@ class ActionTest extends AbstractActionTestCase public function createContentWithFileReferenceAndDeleteFileReference(): void { parent::createContentWithFileReferenceAndDeleteFileReference(); - $this->assertAssertionDataSet('createContentWFileReferenceNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReferenceNDeleteFileReference.csv'); // No FE test: Create and delete scenarios have FE coverage, this test is only about DB state. } } diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Flexform/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Flexform/ActionTest.php index 277f849efe74..db3f7bb64e67 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Flexform/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Flexform/ActionTest.php @@ -21,11 +21,7 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa class ActionTest extends AbstractDataHandlerActionTestCase { - const VALUE_ContentId = 100; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Flexform/DataSet/'; + protected const VALUE_ContentId = 100; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', @@ -34,8 +30,8 @@ class ActionTest extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('LiveDefaultPages'); - $this->importScenarioDataSet('LiveDefaultElements'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultPages.csv'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultElements.csv'); } /** @@ -82,7 +78,7 @@ class ActionTest extends AbstractDataHandlerActionTestCase </data> </T3FlexForms>'; - $this->getActionService()->modifyRecords(1, [ + $this->actionService->modifyRecords(1, [ 'tt_content' => [ 'uid' => self::VALUE_ContentId, 'pi_flexform' => [ @@ -164,7 +160,7 @@ class ActionTest extends AbstractDataHandlerActionTestCase </data> </T3FlexForms>'; - $this->getActionService()->modifyRecords(1, [ + $this->actionService->modifyRecords(1, [ 'tt_content' => [ 'uid' => self::VALUE_ContentId, 'pi_flexform' => [ diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/FlexformIrre/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/FlexformIrre/ActionTest.php index 1544567f5cee..cddbba498b8c 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/FlexformIrre/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/FlexformIrre/ActionTest.php @@ -23,18 +23,10 @@ class ActionTest extends AbstractDataHandlerActionTestCase { protected $coreExtensionsToLoad = ['workspaces']; - /** - * @var array - */ protected $pathsToLinkInTestInstance = [ 'typo3/sysext/core/Tests/Functional/DataHandling/FlexformIrre/Fixtures/fileadmin' => 'fileadmin/fixture', ]; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/FlexformIrre/DataSet/'; - protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield', ]; @@ -53,9 +45,9 @@ class ActionTest extends AbstractDataHandlerActionTestCase */ public function newVersionOfFileRelationInFlexformFieldIsCreatedOnSave(): void { - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(__DIR__ . '/DataSet/ImportDefault.csv'); $this->setWorkspaceId(1); - $this->getActionService()->modifyRecords(1, [ + $this->actionService->modifyRecords(1, [ //'sys_file_reference' => ['uid' => 10, 'hidden' => 0], 'tt_content' => ['uid' => 100, 'header' => 'Content #1 (WS)'], ]); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Group/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/Group/AbstractActionTestCase.php index 85d4ee40a009..5edbe74b92d9 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Group/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Group/AbstractActionTestCase.php @@ -24,25 +24,22 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa */ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase { - const VALUE_PageId = 89; - const VALUE_PageIdTarget = 90; - const VALUE_ContentIdFirst = 297; - const VALUE_ContentIdLast = 298; - const VALUE_LanguageId = 1; - const VALUE_LanguageIdSecond = 2; - const VALUE_ElementIdFirst = 1; - const VALUE_ElementIdSecond = 2; - const VALUE_ElementIdThird = 3; + protected const VALUE_PageId = 89; + protected const VALUE_PageIdTarget = 90; + protected const VALUE_ContentIdFirst = 297; + protected const VALUE_ContentIdLast = 298; + protected const VALUE_LanguageId = 1; + protected const VALUE_LanguageIdSecond = 2; + protected const VALUE_ElementIdFirst = 1; + protected const VALUE_ElementIdSecond = 2; + protected const VALUE_ElementIdThird = 3; - const TABLE_Content = 'tt_content'; - const TABLE_Element = 'tx_testdatahandler_element'; + protected const TABLE_Content = 'tt_content'; + protected const TABLE_Element = 'tx_testdatahandler_element'; - const FIELD_ContentElement = 'tx_testdatahandler_group'; + protected const FIELD_ContentElement = 'tx_testdatahandler_group'; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Group/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', @@ -52,7 +49,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/ActionTest.php index 73ac9ec5ee52..c6fd7ebe958b 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Group/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function addElementRelation(): void { parent::addElementRelation(); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase public function deleteElementRelation(): void { parent::deleteElementRelation(); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -82,7 +77,7 @@ class ActionTest extends AbstractActionTestCase public function changeElementSorting(): void { parent::changeElementSorting(); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -98,7 +93,7 @@ class ActionTest extends AbstractActionTestCase public function changeElementRelationSorting(): void { parent::changeElementRelationSorting(); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -114,7 +109,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndAddElementRelation(): void { parent::createContentAndAddElementRelation(); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -131,7 +126,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndCreateElementRelation(): void { parent::createContentAndCreateElementRelation(); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -149,7 +144,7 @@ class ActionTest extends AbstractActionTestCase public function modifyElementOfRelation(): void { parent::modifyElementOfRelation(); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -165,7 +160,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentOfRelation(): void { parent::modifyContentOfRelation(); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -180,7 +175,7 @@ class ActionTest extends AbstractActionTestCase public function modifyBothSidesOfRelation(): void { parent::modifyBothSidesOfRelation(); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -198,7 +193,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContentOfRelation(): void { parent::deleteContentOfRelation(); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -213,7 +208,7 @@ class ActionTest extends AbstractActionTestCase public function deleteElementOfRelation(): void { parent::deleteElementOfRelation(); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -229,7 +224,7 @@ class ActionTest extends AbstractActionTestCase public function copyContentOfRelation(): void { parent::copyContentOfRelation(); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -246,7 +241,7 @@ class ActionTest extends AbstractActionTestCase public function copyElementOfRelation(): void { parent::copyElementOfRelation(); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -268,7 +263,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId); parent::copyContentToLanguageOfRelation(); - $this->assertAssertionDataSet('copyContentToLanguageOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageOfRelation.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -291,7 +286,7 @@ class ActionTest extends AbstractActionTestCase public function copyElementToLanguageOfRelation(): void { parent::copyElementToLanguageOfRelation(); - $this->assertAssertionDataSet('copyElementToLanguageOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementToLanguageOfRelation.csv'); //in this case the translated element is orphaned (no CE with relation to it, and it has no l10n_parent) //so on frontend there is no change. @@ -309,7 +304,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelation(): void { parent::localizeContentOfRelation(); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -325,7 +320,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelationWithLanguageSynchronization(): void { parent::localizeContentOfRelationWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeContentOfRelationWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -340,7 +335,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelationWithLocalizeReferencesAtParentLocalization() { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } /** @@ -350,7 +345,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentChainOfRelationWithLanguageSynchronizationSource(): void { parent::localizeContentChainOfRelationWithLanguageSynchronizationSource(); - $this->assertAssertionDataSet('localizeContentChainOfRelationWSynchronizationSource'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentChainOfRelationWSynchronizationSource.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -368,7 +363,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeElementOfRelation(); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -384,7 +379,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentOfRelationToDifferentPage(): void { parent::moveContentOfRelationToDifferentPage(); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php index e7e998e5da5b..ce603940a6a5 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php @@ -24,31 +24,28 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa */ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase { - const VALUE_PageId = 89; - const VALUE_PageIdTarget = 90; - const VALUE_PageIdWebsite = 1; - const VALUE_ContentIdFirst = 297; - const VALUE_ContentIdLast = 298; - const VALUE_HotelIdFirst = 3; - const VALUE_HotelIdSecond = 4; - const VALUE_HotelIdThird = 5; - const VALUE_LanguageId = 1; - const VALUE_LanguageIdSecond = 2; - - const TABLE_Page = 'pages'; - const TABLE_Content = 'tt_content'; - const TABLE_Hotel = 'tx_testirrecsv_hotel'; - const TABLE_Offer = 'tx_testirrecsv_offer'; - const TABLE_Price = 'tx_testirrecsv_price'; - - const FIELD_PageHotel = 'tx_testirrecsv_hotels'; - const FIELD_ContentHotel = 'tx_testirrecsv_hotels'; - const FIELD_HotelOffer = 'offers'; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/DataSet/'; + protected const VALUE_PageId = 89; + protected const VALUE_PageIdTarget = 90; + protected const VALUE_PageIdWebsite = 1; + protected const VALUE_ContentIdFirst = 297; + protected const VALUE_ContentIdLast = 298; + protected const VALUE_HotelIdFirst = 3; + protected const VALUE_HotelIdSecond = 4; + protected const VALUE_HotelIdThird = 5; + protected const VALUE_LanguageId = 1; + protected const VALUE_LanguageIdSecond = 2; + + protected const TABLE_Page = 'pages'; + protected const TABLE_Content = 'tt_content'; + protected const TABLE_Hotel = 'tx_testirrecsv_hotel'; + protected const TABLE_Offer = 'tx_testirrecsv_offer'; + protected const TABLE_Price = 'tx_testirrecsv_price'; + + protected const FIELD_PageHotel = 'tx_testirrecsv_hotels'; + protected const FIELD_ContentHotel = 'tx_testirrecsv_hotels'; + protected const FIELD_HotelOffer = 'offers'; + + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv', @@ -59,7 +56,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_csv/Configuration/TypoScript/JsonRenderer.typoscript']); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php index e7cc21392edc..56ecc061ab7f 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function createParentContent(): void { parent::createParentContent(); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -62,7 +57,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentContent(): void { parent::modifyParentContent(); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -80,7 +75,7 @@ class ActionTest extends AbstractActionTestCase public function deleteParentContent(): void { parent::deleteParentContent(); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -95,7 +90,7 @@ class ActionTest extends AbstractActionTestCase public function copyParentContent(): void { parent::copyParentContent(); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -111,7 +106,7 @@ class ActionTest extends AbstractActionTestCase public function copyParentContentToDifferentPage(): void { parent::copyParentContentToDifferentPage(); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -127,7 +122,7 @@ class ActionTest extends AbstractActionTestCase public function copyParentContentToLanguageWithAllChildren(): void { parent::copyParentContentToLanguageWithAllChildren(); - $this->assertAssertionDataSet('copyParentContentToLanguageWithAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToLanguageWithAllChildren.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -151,7 +146,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithAllChildren(); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -170,7 +165,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeParentContentLanguageSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentLanguageSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -186,7 +181,7 @@ class ActionTest extends AbstractActionTestCase public function changeParentContentSorting(): void { parent::changeParentContentSorting(); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -205,7 +200,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPage(): void { parent::moveParentContentToDifferentPage(); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -223,7 +218,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPageAndChangeSorting(): void { parent::moveParentContentToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -248,7 +243,7 @@ class ActionTest extends AbstractActionTestCase public function modifyPage(): void { parent::modifyPage(); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -263,7 +258,7 @@ class ActionTest extends AbstractActionTestCase public function deletePage(): void { parent::deletePage(); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); self::assertEquals(404, $response->getStatusCode()); @@ -276,7 +271,7 @@ class ActionTest extends AbstractActionTestCase public function copyPage(): void { parent::copyPage(); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -291,7 +286,7 @@ class ActionTest extends AbstractActionTestCase public function copyPageWithHotelBeforeParentContent(): void { parent::copyPageWithHotelBeforeParentContent(); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -310,7 +305,7 @@ class ActionTest extends AbstractActionTestCase public function createParentContentWithHotelAndOfferChildren(): void { parent::createParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -328,7 +323,7 @@ class ActionTest extends AbstractActionTestCase public function createAndCopyParentContentWithHotelAndOfferChildren(): void { parent::createAndCopyParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -353,7 +348,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -374,7 +369,7 @@ class ActionTest extends AbstractActionTestCase public function modifyOnlyHotelChild(): void { parent::modifyOnlyHotelChild(); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -390,7 +385,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndChangeHotelChildrenSorting(): void { parent::modifyParentAndChangeHotelChildrenSorting(); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -406,7 +401,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentWithHotelChild(): void { parent::modifyParentWithHotelChild(); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -422,7 +417,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndAddHotelChild(): void { parent::modifyParentAndAddHotelChild(); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -438,7 +433,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndDeleteHotelChild(): void { parent::modifyParentAndDeleteHotelChild(); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -457,7 +452,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageWithLocalizationExclude(): void { parent::localizePageWithLocalizationExclude(); - $this->assertAssertionDataSet('localizePageWExclude'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWExclude.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -473,7 +468,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageTwiceWithLocalizationExclude(): void { parent::localizePageTwiceWithLocalizationExclude(); - $this->assertAssertionDataSet('localizePageTwiceWExclude'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageTwiceWExclude.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -489,7 +484,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageAndAddHotelChildWithLocalizationExclude(): void { parent::localizePageAndAddHotelChildWithLocalizationExclude(); - $this->assertAssertionDataSet('localizePageNAddHotelChildWExclude'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddHotelChildWExclude.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -505,7 +500,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageWithLanguageSynchronization(): void { parent::localizePageWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizePageWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -521,7 +516,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageAndAddHotelChildWithLanguageSynchronization(): void { parent::localizePageAndAddHotelChildWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizePageNAddHotelChildWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddHotelChildWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -537,7 +532,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageAndAddMonoglotHotelChildWithLanguageSynchronization(): void { parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizePageNAddMonoglotHotelChildWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddMonoglotHotelChildWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -553,7 +548,7 @@ class ActionTest extends AbstractActionTestCase public function localizeAndCopyPageWithLanguageSynchronization(): void { parent::localizeAndCopyPageWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeNCopyPageWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNCopyPageWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -572,7 +567,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageWithSynchronizationAndCustomLocalizedHotel(): void { parent::localizePageWithSynchronizationAndCustomLocalizedHotel(); - $this->assertAssertionDataSet('localizePageWithSynchronizationAndCustomLocalizedHotel'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWithSynchronizationAndCustomLocalizedHotel.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -589,7 +584,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization(); parent::copyPage(); - $this->assertAssertionDataSet('localizePageAddMonoglotHotelChildNCopyPageWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageAddMonoglotHotelChildNCopyPageWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php index 528d93cfbd00..7757b28ee6c0 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php @@ -25,33 +25,30 @@ use TYPO3\CMS\Core\Utility\StringUtility; */ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase { - const VALUE_PageId = 89; - const VALUE_PageIdTarget = 90; - const VALUE_PageIdWebsite = 1; - const VALUE_ContentIdFirst = 297; - const VALUE_ContentIdLast = 298; - const VALUE_HotelIdFirst = 3; - const VALUE_HotelIdSecond = 4; - const VALUE_HotelIdThird = 5; - const VALUE_OfferIdLast = 8; - const VALUE_LanguageId = 1; - const VALUE_LanguageIdSecond = 2; - - const TABLE_Page = 'pages'; - const TABLE_Content = 'tt_content'; - const TABLE_Hotel = 'tx_testirreforeignfield_hotel'; - const TABLE_Offer = 'tx_testirreforeignfield_offer'; - const TABLE_Price = 'tx_testirreforeignfield_price'; - - const FIELD_PageHotel = 'tx_testirreforeignfield_hotels'; - const FIELD_ContentHotel = 'tx_testirreforeignfield_hotels'; - const FIELD_HotelOffer = 'offers'; - const FIELD_OfferPrice = 'prices'; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/DataSet/'; + protected const VALUE_PageId = 89; + protected const VALUE_PageIdTarget = 90; + protected const VALUE_PageIdWebsite = 1; + protected const VALUE_ContentIdFirst = 297; + protected const VALUE_ContentIdLast = 298; + protected const VALUE_HotelIdFirst = 3; + protected const VALUE_HotelIdSecond = 4; + protected const VALUE_HotelIdThird = 5; + protected const VALUE_OfferIdLast = 8; + protected const VALUE_LanguageId = 1; + protected const VALUE_LanguageIdSecond = 2; + + protected const TABLE_Page = 'pages'; + protected const TABLE_Content = 'tt_content'; + protected const TABLE_Hotel = 'tx_testirreforeignfield_hotel'; + protected const TABLE_Offer = 'tx_testirreforeignfield_offer'; + protected const TABLE_Price = 'tx_testirreforeignfield_price'; + + protected const FIELD_PageHotel = 'tx_testirreforeignfield_hotels'; + protected const FIELD_ContentHotel = 'tx_testirreforeignfield_hotels'; + protected const FIELD_HotelOffer = 'offers'; + protected const FIELD_OfferPrice = 'prices'; + + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_irre_foreignfield', @@ -60,7 +57,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage( diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php index 995d19d68166..f062d3eb558d 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function createParentContent(): void { parent::createParentContent(); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -62,7 +57,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentContent(): void { parent::modifyParentContent(); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -80,7 +75,7 @@ class ActionTest extends AbstractActionTestCase public function deleteParentContent(): void { parent::deleteParentContent(); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -95,7 +90,7 @@ class ActionTest extends AbstractActionTestCase public function copyParentContent(): void { parent::copyParentContent(); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -111,7 +106,7 @@ class ActionTest extends AbstractActionTestCase public function copyParentContentToDifferentPage(): void { parent::copyParentContentToDifferentPage(); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -129,7 +124,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::copyParentContentToLanguageWithAllChildren(); - $this->assertAssertionDataSet('copyParentContentToLanguageWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToLanguageWAllChildren.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -151,7 +146,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithAllChildren(); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -169,7 +164,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeParentContentSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -188,7 +183,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::localizeParentContentChainLanguageSynchronizationSource(); - $this->assertAssertionDataSet('localizeParentContentChainLanguageSynchronizationSource'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentChainLanguageSynchronizationSource.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -206,7 +201,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentAndCreateNestedChildrenWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeParentContentNCreateNestedChildrenWLanguageSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentNCreateNestedChildrenWLanguageSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -225,7 +220,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentAndSetInvalidChildReferenceWithLanguageSynchronization(); // the assertion is the same as for localizeParentContentWithLanguageSynchronization() - $this->assertAssertionDataSet('localizeParentContentSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -244,7 +239,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentAndSetInvalidChildReferenceWithLateLanguageSynchronization(); // the assertion is the same as for localizeParentContentWithLanguageSynchronization() - $this->assertAssertionDataSet('localizeParentContentSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -260,7 +255,7 @@ class ActionTest extends AbstractActionTestCase public function changeParentContentSorting(): void { parent::changeParentContentSorting(); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -279,7 +274,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPage(): void { parent::moveParentContentToDifferentPage(); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -297,7 +292,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPageAndChangeSorting(): void { parent::moveParentContentToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -322,7 +317,7 @@ class ActionTest extends AbstractActionTestCase public function modifyPage(): void { parent::modifyPage(); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -337,7 +332,7 @@ class ActionTest extends AbstractActionTestCase public function deletePage(): void { parent::deletePage(); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); self::assertEquals(404, $response->getStatusCode()); @@ -350,7 +345,7 @@ class ActionTest extends AbstractActionTestCase public function copyPage(): void { parent::copyPage(); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -365,7 +360,7 @@ class ActionTest extends AbstractActionTestCase public function copyPageWithHotelBeforeParentContent(): void { parent::copyPageWithHotelBeforeParentContent(); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -384,7 +379,7 @@ class ActionTest extends AbstractActionTestCase public function createParentContentWithHotelAndOfferChildren(): void { parent::createParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -402,7 +397,7 @@ class ActionTest extends AbstractActionTestCase public function createAndCopyParentContentWithHotelAndOfferChildren(): void { parent::createAndCopyParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -426,7 +421,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -448,7 +443,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration(); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenWOSortBy'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildrenWOSortBy.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -469,7 +464,7 @@ class ActionTest extends AbstractActionTestCase public function modifyOnlyHotelChild(): void { parent::modifyOnlyHotelChild(); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -485,7 +480,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndChangeHotelChildrenSorting(): void { parent::modifyParentAndChangeHotelChildrenSorting(); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -501,7 +496,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentWithHotelChild(): void { parent::modifyParentWithHotelChild(); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -517,7 +512,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndAddHotelChild(): void { parent::modifyParentAndAddHotelChild(); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -533,7 +528,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndDeleteHotelChild(): void { parent::modifyParentAndDeleteHotelChild(); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -552,7 +547,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageWithLocalizationExclude(): void { parent::localizePageWithLocalizationExclude(); - $this->assertAssertionDataSet('localizePageWExclude'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWExclude.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -568,7 +563,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageTwiceWithLocalizationExclude(): void { parent::localizePageTwiceWithLocalizationExclude(); - $this->assertAssertionDataSet('localizePageTwiceWExclude'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageTwiceWExclude.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -584,7 +579,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageAndAddHotelChildWithLocalizationExclude(): void { parent::localizePageAndAddHotelChildWithLocalizationExclude(); - $this->assertAssertionDataSet('localizePageNAddHotelChildWExclude'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddHotelChildWExclude.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -600,7 +595,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageWithLanguageSynchronization(): void { parent::localizePageWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizePageWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -616,7 +611,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageAndAddHotelChildWithLanguageSynchronization(): void { parent::localizePageAndAddHotelChildWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizePageNAddHotelChildWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddHotelChildWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -632,7 +627,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageAndAddMonoglotHotelChildWithLanguageSynchronization(): void { parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizePageNAddMonoglotHotelChildWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNAddMonoglotHotelChildWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -648,7 +643,7 @@ class ActionTest extends AbstractActionTestCase public function localizeAndCopyPageWithLanguageSynchronization(): void { parent::localizeAndCopyPageWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeNCopyPageWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNCopyPageWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -667,7 +662,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageWithSynchronizationAndCustomLocalizedHotel(): void { parent::localizePageWithSynchronizationAndCustomLocalizedHotel(); - $this->assertAssertionDataSet('localizePageWithSynchronizationAndCustomLocalizedHotel'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWithSynchronizationAndCustomLocalizedHotel.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -684,7 +679,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageAndAddMonoglotHotelChildWithLanguageSynchronization(); parent::copyPage(); - $this->assertAssertionDataSet('localizePageAddMonoglotHotelChildNCopyPageWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageAddMonoglotHotelChildNCopyPageWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -699,6 +694,6 @@ class ActionTest extends AbstractActionTestCase public function inlineLocalizeSynchronizeLocalizeMissing(): void { parent::inlineLocalizeSynchronizeLocalizeMissing(); - $this->assertAssertionDataSet('inlineLocalizeSynchronizeLocalizeMissing'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/inlineLocalizeSynchronizeLocalizeMissing.csv'); } } diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php index cf5302f4eee0..c606f8ce5533 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php @@ -24,28 +24,25 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa */ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase { - const VALUE_PageId = 89; - const VALUE_PageIdTarget = 90; - const VALUE_ContentIdFirst = 297; - const VALUE_ContentIdLast = 298; - const VALUE_LanguageId = 1; - const VALUE_LanguageIdSecond = 2; - const VALUE_CategoryIdFirst = 28; - const VALUE_CategoryIdSecond = 29; - const VALUE_CategoryIdThird = 30; - const VALUE_CategoryIdFourth = 31; - - const TABLE_Page = 'pages'; - const TABLE_Content = 'tt_content'; - const TABLE_Category = 'sys_category'; - const TABLE_ContentCategory_ManyToMany = 'sys_category_record_mm'; - - const FIELD_Categories = 'categories'; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/DataSet/'; + protected const VALUE_PageId = 89; + protected const VALUE_PageIdTarget = 90; + protected const VALUE_ContentIdFirst = 297; + protected const VALUE_ContentIdLast = 298; + protected const VALUE_LanguageId = 1; + protected const VALUE_LanguageIdSecond = 2; + protected const VALUE_CategoryIdFirst = 28; + protected const VALUE_CategoryIdSecond = 29; + protected const VALUE_CategoryIdThird = 30; + protected const VALUE_CategoryIdFourth = 31; + + protected const TABLE_Page = 'pages'; + protected const TABLE_Content = 'tt_content'; + protected const TABLE_Category = 'sys_category'; + protected const TABLE_ContentCategory_ManyToMany = 'sys_category_record_mm'; + + protected const FIELD_Categories = 'categories'; + + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', @@ -54,7 +51,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php index 1e3ecd0df995..f365ef4f8e9b 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/ManyToMany/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelation(): void { parent::addCategoryRelation(); - $this->assertAssertionDataSet('addCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -62,7 +57,7 @@ class ActionTest extends AbstractActionTestCase public function createCategoryAndAddRelation(): void { parent::createCategoryAndAddRelation(); - $this->assertAssertionDataSet('createCategoryAndAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryAndAddRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -78,7 +73,7 @@ class ActionTest extends AbstractActionTestCase public function deleteCategoryRelation(): void { parent::deleteCategoryRelation(); - $this->assertAssertionDataSet('deleteCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -97,7 +92,7 @@ class ActionTest extends AbstractActionTestCase public function changeCategoryRelationSorting(): void { parent::changeCategoryRelationSorting(); - $this->assertAssertionDataSet('changeCategoryRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeCategoryRelationSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -113,7 +108,7 @@ class ActionTest extends AbstractActionTestCase public function modifyCategoryOfRelation(): void { parent::modifyCategoryOfRelation(); - $this->assertAssertionDataSet('modifyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -129,7 +124,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentOfRelation(): void { parent::modifyContentOfRelation(); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -144,7 +139,7 @@ class ActionTest extends AbstractActionTestCase public function modifyBothsOfRelation(): void { parent::modifyBothsOfRelation(); - $this->assertAssertionDataSet('modifyBothsOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothsOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -162,7 +157,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContentOfRelation(): void { parent::deleteContentOfRelation(); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -177,7 +172,7 @@ class ActionTest extends AbstractActionTestCase public function deleteCategoryOfRelation(): void { parent::deleteCategoryOfRelation(); - $this->assertAssertionDataSet('deleteCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -193,7 +188,7 @@ class ActionTest extends AbstractActionTestCase public function copyContentOfRelation(): void { parent::copyContentOfRelation(); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -209,7 +204,7 @@ class ActionTest extends AbstractActionTestCase public function copyCategoryOfRelation(): void { parent::copyCategoryOfRelation(); - $this->assertAssertionDataSet('copyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyCategoryOfRelation.csv'); } /** @@ -219,7 +214,7 @@ class ActionTest extends AbstractActionTestCase public function copyContentToLanguageOfRelation(): void { parent::copyContentToLanguageOfRelation(); - $this->assertAssertionDataSet('copyContentToLanguageOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -235,7 +230,7 @@ class ActionTest extends AbstractActionTestCase public function copyCategoryToLanguageOfRelation(): void { parent::copyCategoryToLanguageOfRelation(); - $this->assertAssertionDataSet('copyCategoryToLanguageOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyCategoryToLanguageOfRelation.csv'); //in this case the translated element is orphaned (no CE with relation to it, and it has no l10n_parent) //so on frontend there is no change. $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); @@ -252,7 +247,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelation(): void { parent::localizeContentOfRelation(); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -268,7 +263,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelationWithLanguageSynchronization(): void { parent::localizeContentOfRelationWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeContentOfRelationWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -284,7 +279,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelationAndAddCategoryWithLanguageSynchronization(): void { parent::localizeContentOfRelationAndAddCategoryWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeContentOfRelationNAddCategoryWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationNAddCategoryWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -300,7 +295,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentChainOfRelationAndAddCategoryWithLanguageSynchronization(): void { parent::localizeContentChainOfRelationAndAddCategoryWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeContentChainOfRelationNAddCategoryWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentChainOfRelationNAddCategoryWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -318,7 +313,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeCategoryOfRelation(); - $this->assertAssertionDataSet('localizeCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -334,7 +329,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentOfRelationToDifferentPage(): void { parent::moveContentOfRelationToDifferentPage(); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -350,7 +345,7 @@ class ActionTest extends AbstractActionTestCase public function copyPage(): void { parent::copyPage(); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php index a7cfa8f4a83d..b9fb5f69e261 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php @@ -29,26 +29,23 @@ use TYPO3\CMS\Core\Utility\StringUtility; */ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase { - const VALUE_PageIdParent = 88; - const VALUE_PageId = 89; - const VALUE_PageIdTarget = 90; - const VALUE_PageIdWebsite = 1; - const VALUE_ContentIdParent = 296; - const VALUE_ContentIdFirst = 297; - const VALUE_ContentIdSecond = 298; - const VALUE_ContentIdThird = 299; - const VALUE_ContentIdThirdLocalized = 300; - const VALUE_ContentIdFreeMode = 310; - const VALUE_LanguageId = 1; - const VALUE_LanguageIdSecond = 2; - - const TABLE_Page = 'pages'; - const TABLE_Content = 'tt_content'; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/'; + protected const VALUE_PageIdParent = 88; + protected const VALUE_PageId = 89; + protected const VALUE_PageIdTarget = 90; + protected const VALUE_PageIdWebsite = 1; + protected const VALUE_ContentIdParent = 296; + protected const VALUE_ContentIdFirst = 297; + protected const VALUE_ContentIdSecond = 298; + protected const VALUE_ContentIdThird = 299; + protected const VALUE_ContentIdThirdLocalized = 300; + protected const VALUE_ContentIdFreeMode = 310; + protected const VALUE_LanguageId = 1; + protected const VALUE_LanguageIdSecond = 2; + + protected const TABLE_Page = 'pages'; + protected const TABLE_Content = 'tt_content'; + + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', @@ -57,11 +54,10 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); - $this->setWorkspaceId(0); } /** diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTest.php index 09e638c5f14e..45fbca6ac5fb 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTest.php @@ -25,11 +25,6 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa */ class CheckValueTest extends AbstractDataHandlerActionTestCase { - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/'; - protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler', ]; @@ -37,7 +32,7 @@ class CheckValueTest extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(__DIR__ . '/DataSet/ImportDefault.csv'); } /** diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForCheckboxes.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForCheckboxesTest.php similarity index 87% rename from typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForCheckboxes.php rename to typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForCheckboxesTest.php index 96fb07bea126..c4faa677e16e 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForCheckboxes.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForCheckboxesTest.php @@ -23,14 +23,8 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa /** * Functional Test for DataHandler::checkValue() concerning checkboxes */ -class CheckValueTestForCheckboxes extends AbstractDataHandlerActionTestCase +class CheckValueTestForCheckboxesTest extends AbstractDataHandlerActionTestCase { - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/'; - protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler', ]; @@ -38,7 +32,7 @@ class CheckValueTestForCheckboxes extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(__DIR__ . '/DataSet/ImportDefault.csv'); } /** diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForSelect.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForSelectTest.php similarity index 87% rename from typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForSelect.php rename to typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForSelectTest.php index cd81dc8978e4..b175717db9d4 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForSelect.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/CheckValueTestForSelectTest.php @@ -23,14 +23,8 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa /** * Functional Test for DataHandler::checkValue() concerning checkboxes */ -class CheckValueTestForSelect extends AbstractDataHandlerActionTestCase +class CheckValueTestForSelectTest extends AbstractDataHandlerActionTestCase { - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/'; - protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_datahandler', ]; @@ -38,7 +32,7 @@ class CheckValueTestForSelect extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(__DIR__ . '/DataSet/ImportDefault.csv'); } /** diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Hooks/PagesTsConfigGuardTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Hooks/PagesTsConfigGuardTest.php index 5d282c39d097..8418dc828ecc 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Hooks/PagesTsConfigGuardTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Hooks/PagesTsConfigGuardTest.php @@ -30,16 +30,6 @@ use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; class PagesTsConfigGuardTest extends FunctionalTestCase { - /** - * @var string - */ - private $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/'; - - /** - * @var string - */ - private $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/Hooks/DataSet/'; - /** * The fixture which is used when initializing a backend user * @@ -50,7 +40,7 @@ class PagesTsConfigGuardTest extends FunctionalTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(__DIR__ . '/../DataSet/ImportDefault.csv'); $this->importDataSet(dirname($this->backendUserFixture) . '/be_groups.xml'); $this->addSiteConfiguration(1); // define page create permissions for backend user group 9 on page 1 @@ -84,7 +74,7 @@ class PagesTsConfigGuardTest extends FunctionalTestCase ]; $this->assertProcessedDataMap($dataMap, $backendUser); - $this->assertAssertionDataSet('pagesTsConfigIsConsideredForAdminUser'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/pagesTsConfigIsConsideredForAdminUser.csv'); } /** @@ -108,24 +98,7 @@ class PagesTsConfigGuardTest extends FunctionalTestCase ]; $this->assertProcessedDataMap($dataMap, $backendUser); - $this->assertAssertionDataSet('pagesTsConfigIsIgnoredForNonAdminUser'); - } - - /** - * @param string $dataSetName - */ - private function importScenarioDataSet($dataSetName): void - { - $fileName = rtrim($this->scenarioDataSetDirectory, '/') . '/' . $dataSetName . '.csv'; - $fileName = GeneralUtility::getFileAbsFileName($fileName); - $this->importCSVDataSet($fileName); - } - - private function assertAssertionDataSet($dataSetName): void - { - $fileName = rtrim($this->assertionDataSetDirectory, '/') . '/' . $dataSetName . '.csv'; - $fileName = GeneralUtility::getFileAbsFileName($fileName); - $this->assertCSVDataSet($fileName); + $this->assertCSVDataSet(__DIR__ . '/DataSet/pagesTsConfigIsIgnoredForNonAdminUser.csv'); } private function assertProcessedDataMap(array $dataMap, BackendUserAuthentication $backendUser): void diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php index b5ef057b5b22..89a0d407a2cc 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php @@ -28,11 +28,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/Modify/DataSet/'; - /** * @test */ @@ -49,7 +44,7 @@ class ActionTest extends AbstractActionTestCase public function createContents(): void { parent::createContents(); - $this->assertAssertionDataSet('createContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContents.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -68,7 +63,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::createContentForLanguageAll(); - $this->assertAssertionDataSet('createContentForLanguageAll'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentForLanguageAll.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -83,7 +78,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContent(): void { parent::modifyContent(); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -100,7 +95,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::modifyTranslatedContent(); - $this->assertAssertionDataSet('modifyTranslatedContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyTranslatedContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -115,7 +110,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContent(): void { parent::deleteContent(); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -135,7 +130,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::deleteLocalizedContentAndDeleteContent(); - $this->assertAssertionDataSet('deleteLocalizedContentNDeleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteLocalizedContentNDeleteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -152,7 +147,7 @@ class ActionTest extends AbstractActionTestCase public function copyContent(): void { parent::copyContent(); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -169,7 +164,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::copyContentToLanguage(); - $this->assertAssertionDataSet('copyContentToLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguage.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -190,7 +185,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::copyContentToLanguageWithLanguageSynchronization(); - $this->assertAssertionDataSet('copyContentToLanguageWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageWSynchronization.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -211,7 +206,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::copyContentToLanguageWithLocalizationExclude(); - $this->assertAssertionDataSet('copyContentToLanguageWExclude'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageWExclude.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -233,7 +228,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::copyContentToLanguageFromNonDefaultLanguage(); - $this->assertAssertionDataSet('copyContentToLanguageFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv'); // Set up "de" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -252,7 +247,7 @@ class ActionTest extends AbstractActionTestCase public function copyPasteContent(): void { parent::copyPasteContent(); - $this->assertAssertionDataSet('copyPasteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPasteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -269,7 +264,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeContent(); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -285,7 +280,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentWithEmptyTcaIntegrityColumns(): void { parent::localizeContentWithEmptyTcaIntegrityColumns(); - $this->assertAssertionDataSet('localizeContentWithEmptyTcaIntegrityColumns'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentWithEmptyTcaIntegrityColumns.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -302,7 +297,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeContentWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizeContentWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -319,7 +314,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeContentWithLanguageSynchronizationHavingNullValue(); - $this->assertAssertionDataSet('localizeContentWSynchronizationHNull'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentWSynchronizationHNull.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -338,7 +333,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::localizeContentFromNonDefaultLanguage(); - $this->assertAssertionDataSet('localizeContentFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentFromNonDefaultLanguage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -357,7 +352,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::localizeContentFromNonDefaultLanguageWithLanguageSynchronizationDefault(); - $this->assertAssertionDataSet('localizeContentFromNonDefaultLanguageWSynchronizationDefault'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentFromNonDefaultLanguageWSynchronizationDefault.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -376,7 +371,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::localizeContentFromNonDefaultLanguageWithLanguageSynchronizationSource(); - $this->assertAssertionDataSet('localizeContentFromNonDefaultLanguageWSynchronizationSource'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentFromNonDefaultLanguageWSynchronizationSource.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -390,7 +385,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentFromNonDefaultLanguageWithAllContentElements(): void { parent::localizeContentFromNonDefaultLanguageWithAllContentElements(); - $this->assertAssertionDataSet('localizeContentFromNonDefaultLanguageWithAllContentElements'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentFromNonDefaultLanguageWithAllContentElements.csv'); } /** @@ -398,9 +393,9 @@ class ActionTest extends AbstractActionTestCase */ public function localizeContentAfterMovedContent(): void { - $this->importScenarioDataSet('ImportFreeModeElements'); + $this->importCSVDataSet(__DIR__ . '/../DataSet/ImportFreeModeElements.csv'); parent::localizeContentAfterMovedContent(); - $this->assertAssertionDataSet('localizeContentAfterMovedContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentAfterMovedContent.csv'); } /** @@ -413,7 +408,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createLocalizedContent(); - $this->assertAssertionDataSet('createLocalizedContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createLocalizedContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -431,7 +426,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createLocalizedContentWithLanguageSynchronization(); - $this->assertAssertionDataSet('createLocalizedContentWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createLocalizedContentWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -449,7 +444,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createLocalizedContentWithLocalizationExclude(); - $this->assertAssertionDataSet('createLocalizedContentWExclude'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createLocalizedContentWExclude.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -464,7 +459,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSorting(): void { parent::changeContentSorting(); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -479,7 +474,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSortingAfterSelf(): void { parent::changeContentSortingAfterSelf(); - $this->assertAssertionDataSet('changeContentSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingAfterSelf.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -494,7 +489,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentToDifferentPage(): void { parent::moveContentToDifferentPage(); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSectionsSource = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -513,7 +508,7 @@ class ActionTest extends AbstractActionTestCase public function movePasteContentToDifferentPage(): void { parent::movePasteContentToDifferentPage(); - $this->assertAssertionDataSet('movePasteContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePasteContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSectionsSource = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -532,7 +527,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentToDifferentPageAndChangeSorting(): void { parent::moveContentToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -551,7 +546,7 @@ class ActionTest extends AbstractActionTestCase public function createPage(): void { parent::createPage(); - $this->assertAssertionDataSet('createPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -565,7 +560,7 @@ class ActionTest extends AbstractActionTestCase public function createPageAndSubPageAndSubPageContent(): void { parent::createPageAndSubPageAndSubPageContent(); - $this->assertAssertionDataSet('createPageAndSubPageAndSubPageContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndSubPageAndSubPageContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newSubPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -602,7 +597,7 @@ class ActionTest extends AbstractActionTestCase ], ]; parent::createPage(); - $this->assertAssertionDataSet('createPageWithSlugOverrideConfiguration'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageWithSlugOverrideConfiguration.csv'); } /** @@ -612,7 +607,7 @@ class ActionTest extends AbstractActionTestCase public function createPageAndContentWithTcaDefaults(): void { parent::createPageAndContentWithTcaDefaults(); - $this->assertAssertionDataSet('createPageNContentWDefaults'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageNContentWDefaults.csv'); // first, assert that page cannot be opened without using backend user (since it's hidden) $response = $this->executeFrontendSubRequest( @@ -643,7 +638,7 @@ class ActionTest extends AbstractActionTestCase public function modifyPage(): void { parent::modifyPage(); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -658,7 +653,7 @@ class ActionTest extends AbstractActionTestCase public function deletePage(): void { parent::deletePage(); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); self::assertEquals(404, $response->getStatusCode()); @@ -671,7 +666,7 @@ class ActionTest extends AbstractActionTestCase public function copyPage(): void { parent::copyPage(); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -690,9 +685,9 @@ class ActionTest extends AbstractActionTestCase */ public function copyPageFreeMode(): void { - $this->importScenarioDataSet('ImportFreeModeElements'); + $this->importCSVDataSet(__DIR__ . '/../DataSet/ImportFreeModeElements.csv'); parent::copyPageFreeMode(); - $this->assertAssertionDataSet('copyPageFreeMode'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageFreeMode.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -707,7 +702,7 @@ class ActionTest extends AbstractActionTestCase public function localizePage(): void { parent::localizePage(); - $this->assertAssertionDataSet('localizePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -723,7 +718,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePage(); parent::copyPage(); - $this->assertAssertionDataSet('localizeNCopyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNCopyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -738,7 +733,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageWithLanguageSynchronization(): void { parent::localizePageWithLanguageSynchronization(); - $this->assertAssertionDataSet('localizePageWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -754,7 +749,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageWithLanguageSynchronization(); parent::copyPage(); - $this->assertAssertionDataSet('localizeNCopyPageWSynchronization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNCopyPageWSynchronization.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -769,7 +764,7 @@ class ActionTest extends AbstractActionTestCase { // Create localized page and localize content elements first parent::localizePageAndContentsAndDeletePageLocalization(); - $this->assertAssertionDataSet('localizePageAndContentsAndDeletePageLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageAndContentsAndDeletePageLocalization.csv'); } /** @@ -778,7 +773,7 @@ class ActionTest extends AbstractActionTestCase public function localizeNestedPagesAndContents(): void { parent::localizeNestedPagesAndContents(); - $this->assertAssertionDataSet('localizeNestedPagesAndContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNestedPagesAndContents.csv'); } /** @@ -787,7 +782,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageHiddenHideAtCopyFalse(): void { parent::localizePageHiddenHideAtCopyFalse(); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyFalse.csv'); } /** @@ -796,7 +791,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageNotHiddenHideAtCopyFalse(): void { parent::localizePageNotHiddenHideAtCopyFalse(); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyFalse.csv'); } /** @@ -805,7 +800,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset(): void { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset(); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyNotDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyNotDisableHideAtCopyUnset.csv'); } /** @@ -814,7 +809,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageHiddenHideAtCopyDisableHideAtCopyUnset(): void { parent::localizePageHiddenHideAtCopyDisableHideAtCopyUnset(); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyNotDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyNotDisableHideAtCopyUnset.csv'); } /** @@ -823,7 +818,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse(): void { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse(); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -832,7 +827,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse(): void { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse(); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -841,7 +836,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue(): void { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue(); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -850,7 +845,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue(): void { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue(); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -860,7 +855,7 @@ class ActionTest extends AbstractActionTestCase public function changePageSorting(): void { parent::changePageSorting(); - $this->assertAssertionDataSet('changePageSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -877,7 +872,7 @@ class ActionTest extends AbstractActionTestCase public function changePageSortingAfterSelf(): void { parent::changePageSortingAfterSelf(); - $this->assertAssertionDataSet('changePageSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSortingAfterSelf.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -894,7 +889,7 @@ class ActionTest extends AbstractActionTestCase public function movePageToDifferentPage(): void { parent::movePageToDifferentPage(); - $this->assertAssertionDataSet('movePageToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -910,7 +905,7 @@ class ActionTest extends AbstractActionTestCase public function movePageToDifferentPageTwice(): void { parent::movePageToDifferentPageTwice(); - $this->assertAssertionDataSet('movePageToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageTwice.csv'); } /** @@ -919,7 +914,7 @@ class ActionTest extends AbstractActionTestCase public function movePageLocalizedToDifferentPageTwice(): void { parent::movePageLocalizedToDifferentPageTwice(); - $this->assertAssertionDataSet('movePageLocalizedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedToDifferentPageTwice.csv'); } /** @@ -929,7 +924,7 @@ class ActionTest extends AbstractActionTestCase public function movePageToDifferentPageAndChangeSorting(): void { parent::movePageToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('movePageToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/MultiSite/MultiSiteTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/MultiSite/MultiSiteTest.php index a1256c07904a..57a4429c8e7b 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/MultiSite/MultiSiteTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/MultiSite/MultiSiteTest.php @@ -28,26 +28,16 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class MultiSiteTest extends AbstractDataHandlerActionTestCase { - const VALUE_PageIdWebsite = 1; - const VALUE_PageIdSecondSite = 50; + protected const VALUE_PageIdWebsite = 1; + protected const VALUE_PageIdSecondSite = 50; - const TABLE_Page = 'pages'; - - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/MultiSite/DataSet/'; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/'; + protected const TABLE_Page = 'pages'; protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(__DIR__ . '/../DataSet/ImportDefault.csv'); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); @@ -65,7 +55,7 @@ class MultiSiteTest extends AbstractDataHandlerActionTestCase // URL is now "/1" for the second site $this->actionService->moveRecord(self::TABLE_Page, self::VALUE_PageIdSecondSite, self::VALUE_PageIdWebsite); - $this->assertAssertionDataSet('moveRootPageToDifferentPageTree'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveRootPageToDifferentPageTree.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdSecondSite)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/PagePermissionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/PagePermissionTest.php index 06a23e92e3aa..41bcbe29450c 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Regular/PagePermissionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Regular/PagePermissionTest.php @@ -26,11 +26,6 @@ use TYPO3\CMS\Core\Type\Bitmask\Permission; */ class PagePermissionTest extends AbstractDataHandlerActionTestCase { - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Regular/DataSet/'; - protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', ]; @@ -38,7 +33,7 @@ class PagePermissionTest extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(__DIR__ . '/DataSet/ImportDefault.csv'); } /** diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Select/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/Select/AbstractActionTestCase.php index 03765dd10e2c..a7a07cc28029 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Select/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Select/AbstractActionTestCase.php @@ -24,24 +24,21 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\AbstractDataHandlerActionTestCa */ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase { - const VALUE_PageId = 89; - const VALUE_PageIdTarget = 90; - const VALUE_ContentIdFirst = 297; - const VALUE_ContentIdLast = 298; - const VALUE_LanguageId = 1; - const VALUE_ElementIdFirst = 1; - const VALUE_ElementIdSecond = 2; - const VALUE_ElementIdThird = 3; + protected const VALUE_PageId = 89; + protected const VALUE_PageIdTarget = 90; + protected const VALUE_ContentIdFirst = 297; + protected const VALUE_ContentIdLast = 298; + protected const VALUE_LanguageId = 1; + protected const VALUE_ElementIdFirst = 1; + protected const VALUE_ElementIdSecond = 2; + protected const VALUE_ElementIdThird = 3; - const TABLE_Content = 'tt_content'; - const TABLE_Element = 'tx_testdatahandler_element'; + protected const TABLE_Content = 'tt_content'; + protected const TABLE_Element = 'tx_testdatahandler_element'; - const FIELD_ContentElement = 'tx_testdatahandler_select'; + protected const FIELD_ContentElement = 'tx_testdatahandler_select'; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Select/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', @@ -51,7 +48,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/ActionTest.php index c9acaa47adc4..8d933145e864 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Select/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function addElementRelation(): void { parent::addElementRelation(); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase public function deleteElementRelation(): void { parent::deleteElementRelation(); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -82,7 +77,7 @@ class ActionTest extends AbstractActionTestCase public function changeElementSorting(): void { parent::changeElementSorting(); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -98,7 +93,7 @@ class ActionTest extends AbstractActionTestCase public function changeElementRelationSorting(): void { parent::changeElementRelationSorting(); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -114,7 +109,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndAddElementRelation(): void { parent::createContentAndAddElementRelation(); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -132,7 +127,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndCreateElementRelation(): void { parent::createContentAndCreateElementRelation(); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -150,7 +145,7 @@ class ActionTest extends AbstractActionTestCase public function modifyElementOfRelation(): void { parent::modifyElementOfRelation(); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -166,7 +161,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentOfRelation(): void { parent::modifyContentOfRelation(); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -181,7 +176,7 @@ class ActionTest extends AbstractActionTestCase public function modifyBothSidesOfRelation(): void { parent::modifyBothSidesOfRelation(); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -199,7 +194,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContentOfRelation(): void { parent::deleteContentOfRelation(); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -214,7 +209,7 @@ class ActionTest extends AbstractActionTestCase public function deleteElementOfRelation(): void { parent::deleteElementOfRelation(); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -230,7 +225,7 @@ class ActionTest extends AbstractActionTestCase public function copyContentOfRelation(): void { parent::copyContentOfRelation(); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -246,7 +241,7 @@ class ActionTest extends AbstractActionTestCase public function copyElementOfRelation(): void { parent::copyElementOfRelation(); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -266,7 +261,7 @@ class ActionTest extends AbstractActionTestCase public function copyContentToLanguageOfRelation(): void { parent::copyContentToLanguageOfRelation(); - $this->assertAssertionDataSet('copyContentToLanguageOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -282,7 +277,7 @@ class ActionTest extends AbstractActionTestCase public function copyElementToLanguageOfRelation(): void { parent::copyElementToLanguageOfRelation(); - $this->assertAssertionDataSet('copyElementToLanguageOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementToLanguageOfRelation.csv'); //in this case the translated element is orphaned (no CE with relation to it, and it has no l10n_parent) //so on frontend there is no change. @@ -300,7 +295,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelation(): void { parent::localizeContentOfRelation(); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -318,7 +313,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeElementOfRelation(); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -333,7 +328,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelationWithLocalizeReferencesAtParentLocalization() { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } /** @@ -343,7 +338,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentOfRelationToDifferentPage(): void { parent::moveContentOfRelationToDifferentPage(); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.php b/typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.php index 5a1be83e7ad8..42f87a7a873b 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.php @@ -33,10 +33,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected const TABLE_Element = 'tx_testselectflexmm_local'; protected const FIELD_Flex = 'flex_1'; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/test_select_flex_mm', @@ -45,7 +42,7 @@ abstract class AbstractActionTestCase extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('ImportDefault'); + $this->importCSVDataSet(static::SCENARIO_DataSet); } public function addElementRelation() diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.php index 2c1946dba850..1fc45bf9bb4a 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.php @@ -21,11 +21,6 @@ use TYPO3\CMS\Core\Tests\Functional\DataHandling\SelectFlex\AbstractActionTestCa class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/SelectFlex/Modify/DataSet/'; - /** * @test */ @@ -41,6 +36,6 @@ class ActionTest extends AbstractActionTestCase public function addElementRelation() { parent::addElementRelation(); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); } } diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Slug/SlugHelperTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Slug/SlugHelperTest.php index cd60dbcb76d6..55e578342179 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Slug/SlugHelperTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Slug/SlugHelperTest.php @@ -26,11 +26,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; */ class SlugHelperTest extends AbstractDataHandlerActionTestCase { - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Slug/DataSet/'; - /** * Default Site Configuration * @var array @@ -82,7 +77,7 @@ class SlugHelperTest extends AbstractDataHandlerActionTestCase { parent::setUp(); - $this->importScenarioDataSet('Pages'); + $this->importCSVDataSet(__DIR__ . '/DataSet/Pages.csv'); $this->setUpFrontendSite(1, $this->siteLanguageConfiguration); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); } diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/Slug/SlugHelperUniqueTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/Slug/SlugHelperUniqueTest.php index b575d47c628c..7b0f94943d51 100644 --- a/typo3/sysext/core/Tests/Functional/DataHandling/Slug/SlugHelperUniqueTest.php +++ b/typo3/sysext/core/Tests/Functional/DataHandling/Slug/SlugHelperUniqueTest.php @@ -24,11 +24,6 @@ use TYPO3\CMS\Core\Utility\GeneralUtility; class SlugHelperUniqueTest extends AbstractDataHandlerActionTestCase { - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/core/Tests/Functional/DataHandling/Slug/DataSet/'; - protected $testExtensionsToLoad = [ 'typo3/sysext/core/Tests/Functional/Fixtures/Extensions/irre_tutorial', ]; @@ -37,7 +32,7 @@ class SlugHelperUniqueTest extends AbstractDataHandlerActionTestCase { parent::setUp(); - $this->importScenarioDataSet('PagesForSlugsUnique'); + $this->importCSVDataSet(__DIR__ . '/DataSet/PagesForSlugsUnique.csv'); $this->setUpFrontendSite(1); $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript']); } diff --git a/typo3/sysext/extbase/Tests/Functional/Persistence/TranslatedSiteContentTest.php b/typo3/sysext/extbase/Tests/Functional/Persistence/TranslatedSiteContentTest.php index 5ef2ea8fa53a..69b2aab74e47 100644 --- a/typo3/sysext/extbase/Tests/Functional/Persistence/TranslatedSiteContentTest.php +++ b/typo3/sysext/extbase/Tests/Functional/Persistence/TranslatedSiteContentTest.php @@ -37,11 +37,6 @@ class TranslatedSiteContentTest extends AbstractDataHandlerActionTestCase protected const TABLE_Content = 'tt_content'; protected const TABLE_Pages = 'pages'; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/frontend/Tests/Functional/Rendering/DataSet/'; - /** * @var array */ @@ -73,8 +68,9 @@ class TranslatedSiteContentTest extends AbstractDataHandlerActionTestCase protected function setUp(): void { parent::setUp(); - $this->importScenarioDataSet('LiveDefaultPages'); - $this->importScenarioDataSet('LiveDefaultElements'); + // @todo: Copy those files to local directory + $this->importCSVDataSet(__DIR__ . '/../../../../frontend/Tests/Functional/Rendering/DataSet/LiveDefaultPages.csv'); + $this->importCSVDataSet(__DIR__ . '/../../../../frontend/Tests/Functional/Rendering/DataSet/LiveDefaultElements.csv'); $this->contentRepository = $this->getContainer()->get(TtContentRepository::class); $this->setUpFrontendRootPage(1, [ diff --git a/typo3/sysext/frontend/Tests/Functional/Rendering/LocalizedSiteContentRenderingTest.php b/typo3/sysext/frontend/Tests/Functional/Rendering/LocalizedSiteContentRenderingTest.php index 26e07788792f..cd8d4faf884f 100644 --- a/typo3/sysext/frontend/Tests/Functional/Rendering/LocalizedSiteContentRenderingTest.php +++ b/typo3/sysext/frontend/Tests/Functional/Rendering/LocalizedSiteContentRenderingTest.php @@ -104,11 +104,6 @@ class LocalizedSiteContentRenderingTest extends AbstractDataHandlerActionTestCas const TABLE_Content = 'tt_content'; const TABLE_Pages = 'pages'; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/frontend/Tests/Functional/Rendering/DataSet/'; - /** * @var string[] */ @@ -137,8 +132,8 @@ class LocalizedSiteContentRenderingTest extends AbstractDataHandlerActionTestCas parent::setUp(); $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml'); - $this->importScenarioDataSet('LiveDefaultPages'); - $this->importScenarioDataSet('LiveDefaultElements'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultPages.csv'); + $this->importCSVDataSet(__DIR__ . '/DataSet/LiveDefaultElements.csv'); $this->setUpFrontendRootPage(1, [ 'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.typoscript', diff --git a/typo3/sysext/recycler/Tests/Functional/Recycle/Pages/AdminRecycleTest.php b/typo3/sysext/recycler/Tests/Functional/Recycle/Pages/AdminRecycleTest.php index aec524ace5e2..027980cef6e2 100644 --- a/typo3/sysext/recycler/Tests/Functional/Recycle/Pages/AdminRecycleTest.php +++ b/typo3/sysext/recycler/Tests/Functional/Recycle/Pages/AdminRecycleTest.php @@ -25,13 +25,6 @@ use TYPO3\CMS\Recycler\Tests\Functional\Recycle\AbstractRecycleTestCase; */ class AdminRecycleTest extends AbstractRecycleTestCase { - /** - * Directory which contains data sets for assertions - * - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/recycler/Tests/Functional/Recycle/Pages/DataSet/Assertion/'; - /** * Set up the test */ @@ -50,7 +43,7 @@ class AdminRecycleTest extends AbstractRecycleTestCase public function retrieveDeletedPagesNoRecursion(): void { $deletedPages = $this->getDeletedPages(1, 0); - $assertData = $this->loadDataSet($this->assertionDataSetDirectory . 'deletedPage-3.xml'); + $assertData = $this->loadDataSet(__DIR__ . '/DataSet/Assertion/deletedPage-3.xml'); self::assertCount(1, $deletedPages); self::assertArrayHasKey('pages', $deletedPages); self::assertCount(3, $deletedPages['pages']); @@ -65,7 +58,7 @@ class AdminRecycleTest extends AbstractRecycleTestCase public function retrieveDeletedPagesOneLevelRecursion(): void { $deletedPages = $this->getDeletedPages(1, 1); - $assertData = $this->loadDataSet($this->assertionDataSetDirectory . 'deletedPage-3_4_5_7.xml'); + $assertData = $this->loadDataSet(__DIR__ . '/DataSet/Assertion/deletedPage-3_4_5_7.xml'); self::assertCount(1, $deletedPages); self::assertArrayHasKey('pages', $deletedPages); self::assertCount(4, $deletedPages['pages']); diff --git a/typo3/sysext/recycler/Tests/Functional/Recycle/Pages/UserRecycleTest.php b/typo3/sysext/recycler/Tests/Functional/Recycle/Pages/UserRecycleTest.php index 58ec1390f53b..08ba35aab984 100644 --- a/typo3/sysext/recycler/Tests/Functional/Recycle/Pages/UserRecycleTest.php +++ b/typo3/sysext/recycler/Tests/Functional/Recycle/Pages/UserRecycleTest.php @@ -25,13 +25,6 @@ use TYPO3\CMS\Recycler\Tests\Functional\Recycle\AbstractRecycleTestCase; */ class UserRecycleTest extends AbstractRecycleTestCase { - /** - * Directory which contains data sets for assertions - * - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/recycler/Tests/Functional/Recycle/Pages/DataSet/Assertion/'; - /** * Set up the test */ @@ -50,7 +43,7 @@ class UserRecycleTest extends AbstractRecycleTestCase public function retrieveDeletedPagesNoRecursion(): void { $deletedPages = $this->getDeletedPages(1, 0); - $assertData = $this->loadDataSet($this->assertionDataSetDirectory . 'deletedPage-3.xml'); + $assertData = $this->loadDataSet(__DIR__ . '/DataSet/Assertion/deletedPage-3.xml'); self::assertCount(1, $deletedPages); self::assertArrayHasKey('pages', $deletedPages); self::assertCount(2, $deletedPages['pages']); @@ -65,7 +58,7 @@ class UserRecycleTest extends AbstractRecycleTestCase public function retrieveDeletedPagesOneLevelRecursion(): void { $deletedPages = $this->getDeletedPages(1, 1); - $assertData = $this->loadDataSet($this->assertionDataSetDirectory . 'deletedPage-3_4_5.xml'); + $assertData = $this->loadDataSet(__DIR__ . '/DataSet/Assertion/deletedPage-3_4_5.xml'); self::assertCount(1, $deletedPages); self::assertArrayHasKey('pages', $deletedPages); self::assertCount(3, $deletedPages['pages']); diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php index 6bbd8fc776cb..5fb974ef79cc 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php @@ -22,21 +22,9 @@ namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL; */ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\FAL\AbstractActionTestCase { - const VALUE_WorkspaceId = 1; + protected const VALUE_WorkspaceId = 1; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; - /** - * @var array - */ protected $coreExtensionsToLoad = ['workspaces']; - - protected function setUp(): void - { - parent::setUp(); - $this->setWorkspaceId(self::VALUE_WorkspaceId); - } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Discard/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Discard/ActionTest.php index 6c27b46fb2c1..4c199a6d5171 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Discard/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Discard/ActionTest.php @@ -24,11 +24,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\FAL\AbstractActionTestCas */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Discard/DataSet/'; - /** * @test */ @@ -45,7 +40,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); } /** @@ -55,7 +50,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); } /** @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); } /** @@ -75,7 +70,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); } /** @@ -85,7 +80,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); } /** @@ -95,7 +90,7 @@ class ActionTest extends AbstractActionTestCase { $newRecordIds = parent::moveContentToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $newRecordIds[self::TABLE_Content][self::VALUE_ContentIdLast]); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); } /** @@ -107,7 +102,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast], ]); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); } /** @@ -121,7 +116,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentWithFileReference(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReference.csv'); } /** @@ -131,7 +126,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentWithFileReference(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentWFileReference.csv'); } /** @@ -141,7 +136,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentAndAddFileReference(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContentNAddFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNAddFileReference.csv'); } /** @@ -151,7 +146,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentAndDeleteFileReference(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContentNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteFileReference.csv'); } /** @@ -161,7 +156,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentAndDeleteAllFileReference(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContentNDeleteAllFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteAllFileReference.csv'); } /** @@ -171,7 +166,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentWithFileReferenceAndDeleteFileReference(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentWFileReferenceNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReferenceNDeleteFileReference.csv'); // No FE test: Create and delete scenarios have FE coverage, this test is only about DB state. } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php index 56420a1788e6..959d39c66177 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContent(): void { parent::modifyContent(); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -67,7 +62,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContent(): void { parent::deleteContent(); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -86,7 +81,7 @@ class ActionTest extends AbstractActionTestCase public function copyContent(): void { parent::copyContent(); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -106,7 +101,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContent(): void { parent::localizeContent(); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -127,7 +122,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSorting(): void { parent::changeContentSorting(); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -150,7 +145,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentToDifferentPage(): void { parent::moveContentToDifferentPage(); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -181,7 +176,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentToDifferentPageAndChangeSorting(): void { parent::moveContentToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -208,7 +203,7 @@ class ActionTest extends AbstractActionTestCase public function createContentWithFileReference(): void { parent::createContentWithFileReference(); - $this->assertAssertionDataSet('createContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReference.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -228,7 +223,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentWithFileReference(): void { parent::modifyContentWithFileReference(); - $this->assertAssertionDataSet('modifyContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentWFileReference.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -248,7 +243,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentAndAddFileReference(): void { parent::modifyContentAndAddFileReference(); - $this->assertAssertionDataSet('modifyContentNAddFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNAddFileReference.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -266,7 +261,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentAndDeleteFileReference(): void { parent::modifyContentAndDeleteFileReference(); - $this->assertAssertionDataSet('modifyContentNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteFileReference.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -287,7 +282,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentAndDeleteAllFileReference(): void { parent::modifyContentAndDeleteAllFileReference(); - $this->assertAssertionDataSet('modifyContentNDeleteAllFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteAllFileReference.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -305,7 +300,7 @@ class ActionTest extends AbstractActionTestCase public function createContentWithFileReferenceAndDeleteFileReference(): void { parent::createContentWithFileReferenceAndDeleteFileReference(); - $this->assertAssertionDataSet('createContentWFileReferenceNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReferenceNDeleteFileReference.csv'); // No FE test: Create and delete scenarios have FE coverage, this test is only about DB state. } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/ActionTest.php index 412c3d5ddb33..8838b8c57e0d 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/Publish/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContent(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContent(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -82,7 +77,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -101,7 +96,7 @@ class ActionTest extends AbstractActionTestCase parent::localizeContent(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -120,7 +115,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSorting(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -141,7 +136,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSectionsSource = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -170,7 +165,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast], ] ); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -195,7 +190,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentWithFileReference(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -213,7 +208,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentWithFileReference(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentWFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -231,7 +226,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentAndAddFileReference(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContentNAddFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNAddFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -247,7 +242,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentAndDeleteFileReference(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContentNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -266,7 +261,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentAndDeleteAllFileReference(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyContentNDeleteAllFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteAllFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -282,7 +277,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentWithFileReferenceAndDeleteFileReference(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentWFileReferenceNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReferenceNDeleteFileReference.csv'); // No FE test: Create and delete scenarios have FE coverage, this test is only about DB state. } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/ActionTest.php index 62d2670f873e..63f026a0a21e 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/FAL/PublishAll/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -82,7 +77,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -100,7 +95,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -119,7 +114,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -140,7 +135,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSectionsSource = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -165,7 +160,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPageAndChangeSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -190,7 +185,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentWithFileReference(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -208,7 +203,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentWithFileReference(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyContentWFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentWFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -226,7 +221,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentAndAddFileReference(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyContentNAddFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNAddFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -242,7 +237,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentAndDeleteFileReference(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyContentNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -261,7 +256,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentAndDeleteAllFileReference(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyContentNDeleteAllFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentNDeleteAllFileReference.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -277,7 +272,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentWithFileReferenceAndDeleteFileReference(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentWFileReferenceNDeleteFileReference'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWFileReferenceNDeleteFileReference.csv'); // No FE test: Create and delete scenarios have FE coverage, this test is only about DB state. } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/AbstractActionTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/AbstractActionTestCase.php index 8a510b6a446a..d09b7675011b 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/AbstractActionTestCase.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/AbstractActionTestCase.php @@ -22,21 +22,9 @@ namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group; */ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\Group\AbstractActionTestCase { - const VALUE_WorkspaceId = 1; + protected const VALUE_WorkspaceId = 1; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; - /** - * @var array - */ protected $coreExtensionsToLoad = ['workspaces']; - - protected function setUp(): void - { - parent::setUp(); - $this->setWorkspaceId(self::VALUE_WorkspaceId); - } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Discard/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Discard/ActionTest.php index 3e9066059244..610fb9bb6b32 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Discard/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Discard/ActionTest.php @@ -24,11 +24,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Group\AbstractActionTestC */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Discard/DataSet/'; - /** * @test */ @@ -45,7 +40,7 @@ class ActionTest extends AbstractActionTestCase { parent::addElementRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); } /** @@ -55,7 +50,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); } /** @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); } /** @@ -75,7 +70,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementRelationSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); } /** @@ -85,7 +80,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndAddElementRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); } /** @@ -96,7 +91,7 @@ class ActionTest extends AbstractActionTestCase { $this->createContentAndCreateElementRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['newElementId']); - $this->assertAssertionDataSet('createContentNCreateRelationNDiscardElement'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelationNDiscardElement.csv'); } /** @@ -107,7 +102,7 @@ class ActionTest extends AbstractActionTestCase { $this->createContentAndCreateElementRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentNCreateRelationNDiscardContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelationNDiscardContent.csv'); } /** @@ -117,7 +112,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyElementOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); } /** @@ -127,7 +122,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); } /** @@ -140,7 +135,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst], self::TABLE_Element => [self::VALUE_ElementIdFirst], ]); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); } /** @@ -150,7 +145,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); } /** @@ -160,7 +155,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); } /** @@ -170,7 +165,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); } /** @@ -180,7 +175,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyElementOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['copiedElementId']); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); } /** @@ -190,7 +185,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); } /** @@ -202,7 +197,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeElementOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['localizedElementId']); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); } /** @@ -212,7 +207,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentOfRelationToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['movedContentId']); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); } /** @@ -222,6 +217,6 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Modify/ActionTest.php index 5443eacce4ca..a0f2f605649a 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Modify/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function addElementRelation(): void { parent::addElementRelation(); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase public function deleteElementRelation(): void { parent::deleteElementRelation(); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -86,7 +81,7 @@ class ActionTest extends AbstractActionTestCase public function changeElementSorting(): void { parent::changeElementSorting(); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -104,7 +99,7 @@ class ActionTest extends AbstractActionTestCase public function changeElementRelationSorting(): void { parent::changeElementRelationSorting(); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -122,7 +117,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndAddElementRelation(): void { parent::createContentAndAddElementRelation(); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -142,7 +137,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndCreateElementRelation(): void { parent::createContentAndCreateElementRelation(); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -162,7 +157,7 @@ class ActionTest extends AbstractActionTestCase public function modifyElementOfRelation(): void { parent::modifyElementOfRelation(); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -180,7 +175,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentOfRelation(): void { parent::modifyContentOfRelation(); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -197,7 +192,7 @@ class ActionTest extends AbstractActionTestCase public function modifyBothSidesOfRelation(): void { parent::modifyBothSidesOfRelation(); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -217,7 +212,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContentOfRelation(): void { parent::deleteContentOfRelation(); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -234,7 +229,7 @@ class ActionTest extends AbstractActionTestCase public function deleteElementOfRelation(): void { parent::deleteElementOfRelation(); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -252,7 +247,7 @@ class ActionTest extends AbstractActionTestCase public function copyContentOfRelation(): void { parent::copyContentOfRelation(); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -271,7 +266,7 @@ class ActionTest extends AbstractActionTestCase public function copyElementOfRelation(): void { parent::copyElementOfRelation(); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -293,7 +288,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelation(): void { parent::localizeContentOfRelation(); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -313,7 +308,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeElementOfRelation(); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -331,7 +326,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentOfRelationToDifferentPage(): void { parent::moveContentOfRelationToDifferentPage(); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -349,6 +344,6 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelationWithLocalizeReferencesAtParentLocalization() { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Publish/ActionTest.php index 87cbb4b9eaa5..ecd62bc5b272 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Publish/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/Publish/DataSet/'; - /** * @test */ @@ -48,7 +43,7 @@ class ActionTest extends AbstractActionTestCase { parent::addElementRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -67,7 +62,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -89,7 +84,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementSorting(); $this->actionService->publishRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -105,7 +100,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementRelationSorting(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -124,7 +119,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndAddElementRelation(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -148,7 +143,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentId']], self::TABLE_Element => [$this->recordIds['newElementId']], ]); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -169,7 +164,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyElementOfRelation(); $this->actionService->publishRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -188,7 +183,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -209,7 +204,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst], self::TABLE_Element => [self::VALUE_ElementIdFirst], ]); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -230,7 +225,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -248,7 +243,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementOfRelation(); $this->actionService->publishRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -267,7 +262,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -287,7 +282,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyElementOfRelation(); $this->actionService->publishRecord(self::TABLE_Element, $this->recordIds['copiedElementId']); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -310,7 +305,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -332,7 +327,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecord('pages', $translatedPageResult['pages'][self::VALUE_PageId]); parent::localizeElementOfRelation(); $this->actionService->publishRecord(self::TABLE_Element, $this->recordIds['localizedElementId']); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -351,7 +346,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentOfRelationToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -370,6 +365,6 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); $this->actionService->publishRecord(self::TABLE_Content, 299); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/PublishAll/ActionTest.php index eee75ba17f1d..5508b837f9a6 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/PublishAll/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Group/PublishAll/DataSet/'; - /** * @test */ @@ -48,7 +43,7 @@ class ActionTest extends AbstractActionTestCase { parent::addElementRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -67,7 +62,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -89,7 +84,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -105,7 +100,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementRelationSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -124,7 +119,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndAddElementRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -145,7 +140,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndCreateElementRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -166,7 +161,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyElementOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -185,7 +180,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -203,7 +198,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyBothSidesOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -224,7 +219,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -242,7 +237,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -261,7 +256,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -281,7 +276,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyElementOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -304,7 +299,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -325,7 +320,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeElementOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -344,7 +339,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentOfRelationToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -363,6 +358,6 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php index 30edb3f81b01..f388cd8d90e4 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/AbstractActionTestCase.php @@ -22,24 +22,12 @@ namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV; */ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTestCase { - const VALUE_WorkspaceId = 1; + protected const VALUE_WorkspaceId = 1; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; - /** - * @var array - */ protected $coreExtensionsToLoad = ['workspaces']; - protected function setUp(): void - { - parent::setUp(); - $this->setWorkspaceId(self::VALUE_WorkspaceId); - } - public function changeHotelSortingWithOfferNotWorkspaceAware(): void { $GLOBALS['TCA']['tx_testirrecsv_offer']['ctrl']['versioningWS'] = false; diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Discard/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Discard/ActionTest.php index a7b31d40a270..004f5a582981 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Discard/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Discard/ActionTest.php @@ -24,11 +24,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\CSV\AbstractActionTe */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Discard/DataSet/'; - /** * @test */ @@ -45,7 +40,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); } /** @@ -55,7 +50,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); } /** @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteParentContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); } /** @@ -75,7 +70,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); } /** @@ -85,7 +80,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContentToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); } /** @@ -97,7 +92,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithAllChildren(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); } /** @@ -107,7 +102,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeParentContentSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); } /** @@ -117,7 +112,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); } /** @@ -127,7 +122,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPageTwice(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('moveParentContentToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv'); } /** @@ -139,7 +134,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast], ]); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); } /** @@ -153,7 +148,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); } /** @@ -163,7 +158,7 @@ class ActionTest extends AbstractActionTestCase { parent::deletePage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); } /** @@ -175,7 +170,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Page => [$this->recordIds['newPageId']], ]); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); } /** @@ -187,7 +182,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Page => [$this->recordIds['newPageId']], ]); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); } /** @@ -201,7 +196,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContentWithHotelAndOfferChildren(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); } /** @@ -212,7 +207,7 @@ class ActionTest extends AbstractActionTestCase parent::createAndCopyParentContentWithHotelAndOfferChildren(); $versionedCopiedContentId = $this->actionService->getDataHandler()->getAutoVersionId(self::TABLE_Content, $this->recordIds['copiedContentId']); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $versionedCopiedContentId); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); } /** @@ -225,7 +220,7 @@ class ActionTest extends AbstractActionTestCase parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); // Discard created default language parent $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); } /** @@ -235,7 +230,7 @@ class ActionTest extends AbstractActionTestCase public function createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent(): void { parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent(); - $this->assertAssertionDataSet('createNLocParentNHotelNOfferChildrenNDiscardLocParent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocParentNHotelNOfferChildrenNDiscardLocParent.csv'); } /** @@ -245,7 +240,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyOnlyHotelChild(); $this->actionService->clearWorkspaceRecord(self::TABLE_Hotel, 4); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); } /** @@ -255,7 +250,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndChangeHotelChildrenSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); } /** @@ -266,7 +261,7 @@ class ActionTest extends AbstractActionTestCase parent::modifyParentWithHotelChild(); $modifiedContentId = $this->actionService->getDataHandler()->getAutoVersionId(self::TABLE_Content, self::VALUE_ContentIdFirst); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $modifiedContentId); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); } /** @@ -276,7 +271,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndAddHotelChild(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); } /** @@ -286,7 +281,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndDeleteHotelChild(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); } /** @@ -299,6 +294,6 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst], self::TABLE_Hotel => [3, 4], ]); - $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php index ff1501806f47..b2dee298c011 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function createParentContent(): void { parent::createParentContent(); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -64,7 +59,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentContent(): void { parent::modifyParentContent(); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -84,7 +79,7 @@ class ActionTest extends AbstractActionTestCase public function deleteParentContent(): void { parent::deleteParentContent(); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -101,7 +96,7 @@ class ActionTest extends AbstractActionTestCase public function copyParentContent(): void { parent::copyParentContent(); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -119,7 +114,7 @@ class ActionTest extends AbstractActionTestCase public function copyParentContentToDifferentPage(): void { parent::copyParentContentToDifferentPage(); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -139,7 +134,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithAllChildren(); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -157,7 +152,7 @@ class ActionTest extends AbstractActionTestCase public function changeParentContentSorting(): void { parent::changeParentContentSorting(); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -178,7 +173,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPage(): void { parent::moveParentContentToDifferentPage(); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -198,7 +193,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPageTwice(): void { parent::moveParentContentToDifferentPageTwice(); - $this->assertAssertionDataSet('moveParentContentToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv'); } /** @@ -207,7 +202,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPageAndChangeSorting(): void { parent::moveParentContentToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -234,7 +229,7 @@ class ActionTest extends AbstractActionTestCase public function modifyPage(): void { parent::modifyPage(); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -254,7 +249,7 @@ class ActionTest extends AbstractActionTestCase public function deletePage(): void { parent::deletePage(); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -269,7 +264,7 @@ class ActionTest extends AbstractActionTestCase public function copyPage(): void { parent::copyPage(); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['newPageId']), (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId) @@ -285,7 +280,7 @@ class ActionTest extends AbstractActionTestCase public function copyPageWithHotelBeforeParentContent(): void { parent::copyPageWithHotelBeforeParentContent(); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['newPageId']), @@ -307,7 +302,7 @@ class ActionTest extends AbstractActionTestCase public function changeHotelSortingWithOfferNotWorkspaceAware(): void { parent::changeHotelSortingWithOfferNotWorkspaceAware(); - $this->assertAssertionDataSet('changeHotelSortingWithOfferNotWorkspaceAware'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeHotelSortingWithOfferNotWorkspaceAware.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -333,7 +328,7 @@ class ActionTest extends AbstractActionTestCase public function createParentContentWithHotelAndOfferChildren(): void { parent::createParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -353,7 +348,7 @@ class ActionTest extends AbstractActionTestCase public function createAndCopyParentContentWithHotelAndOfferChildren(): void { parent::createAndCopyParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -381,7 +376,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -404,7 +399,7 @@ class ActionTest extends AbstractActionTestCase public function modifyOnlyHotelChild(): void { parent::modifyOnlyHotelChild(); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -422,7 +417,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndChangeHotelChildrenSorting(): void { parent::modifyParentAndChangeHotelChildrenSorting(); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -440,7 +435,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentWithHotelChild(): void { parent::modifyParentWithHotelChild(); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -458,7 +453,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndAddHotelChild(): void { parent::modifyParentAndAddHotelChild(); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -476,7 +471,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndDeleteHotelChild(): void { parent::modifyParentAndDeleteHotelChild(); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -497,7 +492,7 @@ class ActionTest extends AbstractActionTestCase public function modifyAndDiscardAndModifyParentWithHotelChild(): void { parent::modifyAndDiscardAndModifyParentWithHotelChild(); - $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php index cd8ba8dc21b6..f73424c734a6 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/Publish/DataSet/'; - /** * @test */ @@ -48,7 +43,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentContent(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -81,7 +76,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteParentContent(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -96,7 +91,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -112,7 +107,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContentToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -131,7 +126,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecord(self::TABLE_Page, $translatedPageResult[self::TABLE_Page][self::VALUE_PageId]); parent::localizeParentContentWithAllChildren(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -147,7 +142,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeParentContentSorting(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -166,7 +161,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -184,7 +179,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPageTwice(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveParentContentToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv'); } /** @@ -196,7 +191,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecords([ self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast], ]); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -221,7 +216,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyPage(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -239,7 +234,7 @@ class ActionTest extends AbstractActionTestCase { parent::deletePage(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId) @@ -257,7 +252,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Page => [$this->recordIds['newPageId']], self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']], ]); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -277,7 +272,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']], ] ); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -296,7 +291,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContentWithHotelAndOfferChildren(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -315,7 +310,7 @@ class ActionTest extends AbstractActionTestCase parent::createAndCopyParentContentWithHotelAndOfferChildren(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -343,7 +338,7 @@ class ActionTest extends AbstractActionTestCase parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -364,7 +359,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyOnlyHotelChild(); $this->actionService->publishRecord(self::TABLE_Hotel, 4); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -380,7 +375,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndChangeHotelChildrenSorting(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -396,7 +391,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentWithHotelChild(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -412,7 +407,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndAddHotelChild(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -428,7 +423,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndDeleteHotelChild(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -450,7 +445,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst], self::TABLE_Hotel => [3, 4], ]); - $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php index ed051ba60a07..b864c65f1edf 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/CSV/PublishAll/DataSet/'; - /** * @test */ @@ -48,7 +43,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -81,7 +76,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -96,7 +91,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -112,7 +107,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContentToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -130,7 +125,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithAllChildren(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -146,7 +141,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeParentContentSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -165,7 +160,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -183,7 +178,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPageTwice(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveParentContentToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv'); } /** @@ -193,7 +188,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPageAndChangeSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -218,7 +213,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -236,7 +231,7 @@ class ActionTest extends AbstractActionTestCase { parent::deletePage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId) @@ -251,7 +246,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -266,7 +261,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyPageWithHotelBeforeParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -285,7 +280,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContentWithHotelAndOfferChildren(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -303,7 +298,7 @@ class ActionTest extends AbstractActionTestCase { parent::createAndCopyParentContentWithHotelAndOfferChildren(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -329,7 +324,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -350,7 +345,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyOnlyHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -366,7 +361,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndChangeHotelChildrenSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -382,7 +377,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentWithHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -398,7 +393,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndAddHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -414,7 +409,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndDeleteHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -433,7 +428,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyAndDiscardAndModifyParentWithHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php index b7946ec250eb..dfa0020abaec 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/AbstractActionTestCase.php @@ -22,24 +22,12 @@ namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField; */ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\IRRE\ForeignField\AbstractActionTestCase { - const VALUE_WorkspaceId = 1; + protected const VALUE_WorkspaceId = 1; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; - /** - * @var array - */ protected $coreExtensionsToLoad = ['workspaces']; - protected function setUp(): void - { - parent::setUp(); - $this->setWorkspaceId(self::VALUE_WorkspaceId); - } - public function changeHotelSortingWithOfferNotWorkspaceAware(): void { $GLOBALS['TCA']['tx_testirreforeignfield_offer']['ctrl']['versioningWS'] = false; diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Discard/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Discard/ActionTest.php index 20b9a3cce53f..d31221409418 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Discard/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Discard/ActionTest.php @@ -24,11 +24,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\IRRE\ForeignField\Abstrac */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Discard/DataSet/'; - /** * @test */ @@ -45,7 +40,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); } /** @@ -55,7 +50,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); } /** @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteParentContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); } /** @@ -75,7 +70,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); } /** @@ -85,7 +80,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContentToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); } /** @@ -97,7 +92,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithAllChildren(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); } /** @@ -107,7 +102,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeParentContentSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); } /** @@ -117,7 +112,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); } /** @@ -127,7 +122,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPageTwice(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('moveParentContentToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv'); } /** @@ -139,7 +134,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast], ]); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); } /** @@ -153,7 +148,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); } /** @@ -163,7 +158,7 @@ class ActionTest extends AbstractActionTestCase { parent::deletePage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); } /** @@ -175,7 +170,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Page => [$this->recordIds['newPageId']], ]); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); } /** @@ -187,7 +182,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Page => [$this->recordIds['newPageId']], ]); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); } /** @@ -201,7 +196,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContentWithHotelAndOfferChildren(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); } /** @@ -212,7 +207,7 @@ class ActionTest extends AbstractActionTestCase parent::createAndCopyParentContentWithHotelAndOfferChildren(); $versionedCopiedContentId = $this->actionService->getDataHandler()->getAutoVersionId(self::TABLE_Content, $this->recordIds['copiedContentId']); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $versionedCopiedContentId); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); } /** @@ -225,7 +220,7 @@ class ActionTest extends AbstractActionTestCase parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); // Discard created default language parent $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); } /** @@ -235,7 +230,7 @@ class ActionTest extends AbstractActionTestCase public function createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent(): void { parent::createAndLocalizeParentContentWithHotelAndOfferChildrenAndDiscardLocalizedParent(); - $this->assertAssertionDataSet('createNLocParentNHotelNOfferChildrenNDiscardLocParent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocParentNHotelNOfferChildrenNDiscardLocParent.csv'); } /** @@ -245,7 +240,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyOnlyHotelChild(); $this->actionService->clearWorkspaceRecord(self::TABLE_Hotel, 4); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); } /** @@ -255,7 +250,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndChangeHotelChildrenSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); } /** @@ -266,7 +261,7 @@ class ActionTest extends AbstractActionTestCase parent::modifyParentWithHotelChild(); $modifiedContentId = $this->actionService->getDataHandler()->getAutoVersionId(self::TABLE_Content, self::VALUE_ContentIdFirst); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $modifiedContentId); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); } /** @@ -276,7 +271,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndAddHotelChild(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); } /** @@ -286,7 +281,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndDeleteHotelChild(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); } /** @@ -299,6 +294,6 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst], self::TABLE_Hotel => [3, 4], ]); - $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php index da178f402039..7d89bc6dc216 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function createParentContent(): void { parent::createParentContent(); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -64,7 +59,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentContent(): void { parent::modifyParentContent(); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -84,7 +79,7 @@ class ActionTest extends AbstractActionTestCase public function deleteParentContent(): void { parent::deleteParentContent(); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -101,7 +96,7 @@ class ActionTest extends AbstractActionTestCase public function copyParentContent(): void { parent::copyParentContent(); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -119,7 +114,7 @@ class ActionTest extends AbstractActionTestCase public function copyParentContentToDifferentPage(): void { parent::copyParentContentToDifferentPage(); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -139,7 +134,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithAllChildren(); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -157,7 +152,7 @@ class ActionTest extends AbstractActionTestCase public function changeParentContentSorting(): void { parent::changeParentContentSorting(); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -178,7 +173,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPage(): void { parent::moveParentContentToDifferentPage(); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -198,7 +193,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPageTwice(): void { parent::moveParentContentToDifferentPageTwice(); - $this->assertAssertionDataSet('moveParentContentToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv'); } /** @@ -207,7 +202,7 @@ class ActionTest extends AbstractActionTestCase public function moveParentContentToDifferentPageAndChangeSorting(): void { parent::moveParentContentToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -234,7 +229,7 @@ class ActionTest extends AbstractActionTestCase public function modifyPage(): void { parent::modifyPage(); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -254,7 +249,7 @@ class ActionTest extends AbstractActionTestCase public function deletePage(): void { parent::deletePage(); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -269,7 +264,7 @@ class ActionTest extends AbstractActionTestCase public function copyPage(): void { parent::copyPage(); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['newPageId']), @@ -286,7 +281,7 @@ class ActionTest extends AbstractActionTestCase public function copyPageWithHotelBeforeParentContent(): void { parent::copyPageWithHotelBeforeParentContent(); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['newPageId']), @@ -308,7 +303,7 @@ class ActionTest extends AbstractActionTestCase public function changeHotelSortingWithOfferNotWorkspaceAware(): void { parent::changeHotelSortingWithOfferNotWorkspaceAware(); - $this->assertAssertionDataSet('changeHotelSortingWithOfferNotWorkspaceAware'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeHotelSortingWithOfferNotWorkspaceAware.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -334,7 +329,7 @@ class ActionTest extends AbstractActionTestCase public function createParentContentWithHotelAndOfferChildren(): void { parent::createParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -354,7 +349,7 @@ class ActionTest extends AbstractActionTestCase public function createAndCopyParentContentWithHotelAndOfferChildren(): void { parent::createAndCopyParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -382,7 +377,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -408,7 +403,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createAndLocalizeParentContentWithHotelAndOfferChildrenWithoutSortByConfiguration(); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildrenWOSortBy'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildrenWOSortBy.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -431,7 +426,7 @@ class ActionTest extends AbstractActionTestCase public function modifyOnlyHotelChild(): void { parent::modifyOnlyHotelChild(); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -449,7 +444,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndChangeHotelChildrenSorting(): void { parent::modifyParentAndChangeHotelChildrenSorting(); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -467,7 +462,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentWithHotelChild(): void { parent::modifyParentWithHotelChild(); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -485,7 +480,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndAddHotelChild(): void { parent::modifyParentAndAddHotelChild(); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -503,7 +498,7 @@ class ActionTest extends AbstractActionTestCase public function modifyParentAndDeleteHotelChild(): void { parent::modifyParentAndDeleteHotelChild(); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -524,7 +519,7 @@ class ActionTest extends AbstractActionTestCase public function modifyAndDiscardAndModifyParentWithHotelChild(): void { parent::modifyAndDiscardAndModifyParentWithHotelChild(); - $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -548,6 +543,6 @@ class ActionTest extends AbstractActionTestCase public function inlineLocalizeSynchronizeLocalizeMissing(): void { parent::inlineLocalizeSynchronizeLocalizeMissing(); - $this->assertAssertionDataSet('inlineLocalizeSynchronizeLocalizeMissing'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/inlineLocalizeSynchronizeLocalizeMissing.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php index 679a03db7bd8..7132fead5769 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/Publish/DataSet/'; - /** * @test */ @@ -48,7 +43,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentContent(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -81,7 +76,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteParentContent(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -96,7 +91,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -112,7 +107,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContentToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -131,7 +126,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecord(self::TABLE_Page, $translatedPageResult[self::TABLE_Page][self::VALUE_PageId]); parent::localizeParentContentWithAllChildren(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -147,7 +142,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeParentContentSorting(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -166,7 +161,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -185,7 +180,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPageTwice(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveParentContentToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv'); } /** @@ -199,7 +194,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdLast], ] ); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -224,7 +219,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyPage(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -242,7 +237,7 @@ class ActionTest extends AbstractActionTestCase { parent::deletePage(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId) @@ -262,7 +257,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']], ] ); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -282,7 +277,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']], ] ); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -301,7 +296,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContentWithHotelAndOfferChildren(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -320,7 +315,7 @@ class ActionTest extends AbstractActionTestCase parent::createAndCopyParentContentWithHotelAndOfferChildren(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -348,7 +343,7 @@ class ActionTest extends AbstractActionTestCase parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -369,7 +364,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyOnlyHotelChild(); $this->actionService->publishRecord(self::TABLE_Hotel, 4); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -385,7 +380,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndChangeHotelChildrenSorting(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -401,7 +396,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentWithHotelChild(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -417,7 +412,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndAddHotelChild(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -433,7 +428,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndDeleteHotelChild(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -457,7 +452,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Hotel => [3, 4], ] ); - $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php index fa1201bfb5a6..7410525b2100 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/IRRE/ForeignField/PublishAll/DataSet/'; - /** * @test */ @@ -48,7 +43,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -81,7 +76,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -96,7 +91,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -112,7 +107,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyParentContentToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -130,7 +125,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeParentContentWithAllChildren(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeParentContentWAllChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeParentContentWAllChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -146,7 +141,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeParentContentSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeParentContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeParentContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -165,7 +160,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveParentContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -184,7 +179,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPageTwice(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveParentContentToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageTwice.csv'); } /** @@ -194,7 +189,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveParentContentToDifferentPageAndChangeSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveParentContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveParentContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -219,7 +214,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -237,7 +232,7 @@ class ActionTest extends AbstractActionTestCase { parent::deletePage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId) @@ -252,7 +247,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -267,7 +262,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyPageWithHotelBeforeParentContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyPageWHotelBeforeParentContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageWHotelBeforeParentContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -286,7 +281,7 @@ class ActionTest extends AbstractActionTestCase { parent::createParentContentWithHotelAndOfferChildren(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -304,7 +299,7 @@ class ActionTest extends AbstractActionTestCase { parent::createAndCopyParentContentWithHotelAndOfferChildren(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createNCopyParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNCopyParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -330,7 +325,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::createAndLocalizeParentContentWithHotelAndOfferChildren(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createNLocalizeParentContentNHotelNOfferChildren'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNLocalizeParentContentNHotelNOfferChildren.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -351,7 +346,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyOnlyHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyOnlyHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyOnlyHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -367,7 +362,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndChangeHotelChildrenSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentNChangeHotelChildrenSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNChangeHotelChildrenSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -383,7 +378,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentWithHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentNHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -399,7 +394,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndAddHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentNAddHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNAddHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -415,7 +410,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyParentAndDeleteHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyParentNDeleteHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyParentNDeleteHotelChild.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections('Default', 'Extbase:list()'); @@ -434,7 +429,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyAndDiscardAndModifyParentWithHotelChild(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyNDiscardNModifyParentWHotelChild'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyNDiscardNModifyParentWHotelChild.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php index 9adeec5ab5d2..d9c45601fb63 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/AbstractActionTestCase.php @@ -22,25 +22,13 @@ namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany; */ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\ManyToMany\AbstractActionTestCase { - const VALUE_CategoryIdLast = 31; - const VALUE_WorkspaceId = 1; + protected const VALUE_CategoryIdLast = 31; + protected const VALUE_WorkspaceId = 1; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; - /** - * @var array - */ protected $coreExtensionsToLoad = ['workspaces']; - protected function setUp(): void - { - parent::setUp(); - $this->setWorkspaceId(self::VALUE_WorkspaceId); - } - public function createContentAndAddRelation(): void { $newTableIds = $this->actionService->createNewRecord( diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Discard/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Discard/ActionTest.php index 4471b513e205..eca77e953c93 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Discard/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Discard/ActionTest.php @@ -24,11 +24,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\ManyToMany\AbstractAction */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Discard/DataSet/'; - /** * @test */ @@ -45,7 +40,7 @@ class ActionTest extends AbstractActionTestCase { parent::addCategoryRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('addCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelation.csv'); } /** @@ -55,7 +50,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteCategoryRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('deleteCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelation.csv'); } /** @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeCategoryRelationSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeCategoryRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeCategoryRelationSorting.csv'); } /** @@ -75,7 +70,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndAddRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); } /** @@ -85,7 +80,7 @@ class ActionTest extends AbstractActionTestCase { parent::createCategoryAndAddRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Category, $this->recordIds['newCategoryId']); - $this->assertAssertionDataSet('createCategoryNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNAddRelation.csv'); } /** @@ -98,7 +93,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Category => [$this->recordIds['newCategoryId']], self::TABLE_Content => [$this->recordIds['newContentId']], ]); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); } /** @@ -111,7 +106,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentId']], self::TABLE_Category => [$this->recordIds['newCategoryId']], ]); - $this->assertAssertionDataSet('createCategoryNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNCreateRelation.csv'); } /** @@ -124,7 +119,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Category => [$this->recordIds['newCategoryId']], self::TABLE_Content => [$this->recordIds['newContentId']], ]); - $this->assertAssertionDataSet('createContentWCategoryNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWCategoryNAddRelation.csv'); } /** @@ -137,7 +132,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentId']], self::TABLE_Category => [$this->recordIds['newCategoryId']], ]); - $this->assertAssertionDataSet('createCategoryWContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryWContentNAddRelation.csv'); } /** @@ -147,7 +142,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyCategoryOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst); - $this->assertAssertionDataSet('modifyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyCategoryOfRelation.csv'); } /** @@ -157,7 +152,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); } /** @@ -170,7 +165,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst], self::TABLE_Category => [self::VALUE_CategoryIdFirst], ]); - $this->assertAssertionDataSet('modifyBothsOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothsOfRelation.csv'); } /** @@ -180,7 +175,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); } /** @@ -190,7 +185,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteCategoryOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst); - $this->assertAssertionDataSet('deleteCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryOfRelation.csv'); } /** @@ -200,7 +195,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); } /** @@ -210,7 +205,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyCategoryOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Category, $this->recordIds['newCategoryId']); - $this->assertAssertionDataSet('copyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyCategoryOfRelation.csv'); } /** @@ -220,7 +215,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); } /** @@ -232,7 +227,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeCategoryOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Category, $this->recordIds['localizedCategoryId']); - $this->assertAssertionDataSet('localizeCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeCategoryOfRelation.csv'); } /** @@ -242,7 +237,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentOfRelationToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); } /** @@ -254,6 +249,6 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Page => [$this->recordIds['newPageId']], ]); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php index d7d0aa63733a..081697d9ba91 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Modify/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function addCategoryRelation(): void { parent::addCategoryRelation(); - $this->assertAssertionDataSet('addCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase public function deleteCategoryRelation(): void { parent::deleteCategoryRelation(); - $this->assertAssertionDataSet('deleteCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -86,7 +81,7 @@ class ActionTest extends AbstractActionTestCase public function changeCategoryRelationSorting(): void { parent::changeCategoryRelationSorting(); - $this->assertAssertionDataSet('changeCategoryRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeCategoryRelationSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -104,7 +99,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndAddRelation(): void { parent::createContentAndAddRelation(); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -124,7 +119,7 @@ class ActionTest extends AbstractActionTestCase public function createCategoryAndAddRelation(): void { parent::createCategoryAndAddRelation(); - $this->assertAssertionDataSet('createCategoryNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNAddRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -144,7 +139,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndCreateRelation(): void { parent::createContentAndCreateRelation(); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -164,7 +159,7 @@ class ActionTest extends AbstractActionTestCase public function createCategoryAndCreateRelation(): void { parent::createCategoryAndCreateRelation(); - $this->assertAssertionDataSet('createCategoryNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNCreateRelation.csv'); } /** @@ -173,7 +168,7 @@ class ActionTest extends AbstractActionTestCase public function createContentWithCategoryAndAddRelation(): void { parent::createContentWithCategoryAndAddRelation(); - $this->assertAssertionDataSet('createContentWCategoryNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWCategoryNAddRelation.csv'); } /** @@ -182,7 +177,7 @@ class ActionTest extends AbstractActionTestCase public function createCategoryWithContentAndAddRelation(): void { parent::createCategoryWithContentAndAddRelation(); - $this->assertAssertionDataSet('createCategoryWContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryWContentNAddRelation.csv'); } /** @@ -191,7 +186,7 @@ class ActionTest extends AbstractActionTestCase public function modifyCategoryOfRelation(): void { parent::modifyCategoryOfRelation(); - $this->assertAssertionDataSet('modifyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -209,7 +204,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentOfRelation(): void { parent::modifyContentOfRelation(); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -226,7 +221,7 @@ class ActionTest extends AbstractActionTestCase public function modifyBothsOfRelation(): void { parent::modifyBothsOfRelation(); - $this->assertAssertionDataSet('modifyBothsOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothsOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -246,7 +241,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContentOfRelation(): void { parent::deleteContentOfRelation(); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -263,7 +258,7 @@ class ActionTest extends AbstractActionTestCase public function deleteCategoryOfRelation(): void { parent::deleteCategoryOfRelation(); - $this->assertAssertionDataSet('deleteCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -281,7 +276,7 @@ class ActionTest extends AbstractActionTestCase public function copyContentOfRelation(): void { parent::copyContentOfRelation(); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -299,7 +294,7 @@ class ActionTest extends AbstractActionTestCase public function copyCategoryOfRelation(): void { parent::copyCategoryOfRelation(); - $this->assertAssertionDataSet('copyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -317,7 +312,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelation(): void { parent::localizeContentOfRelation(); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -337,7 +332,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeCategoryOfRelation(); - $this->assertAssertionDataSet('localizeCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -355,7 +350,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentOfRelationToDifferentPage(): void { parent::moveContentOfRelationToDifferentPage(); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -373,7 +368,7 @@ class ActionTest extends AbstractActionTestCase public function copyPage(): void { parent::copyPage(); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['newPageId']), diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/ActionTest.php index 0f4ce03e2073..4abd5a114129 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/Publish/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase { parent::addCategoryRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('addCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteCategoryRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('deleteCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -82,7 +77,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeCategoryRelationSorting(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeCategoryRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeCategoryRelationSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -98,7 +93,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndAddRelation(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -116,7 +111,7 @@ class ActionTest extends AbstractActionTestCase { parent::createCategoryAndAddRelation(); $this->actionService->publishRecord(self::TABLE_Category, $this->recordIds['newCategoryId']); - $this->assertAssertionDataSet('createCategoryNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNAddRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -137,7 +132,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Category => [$this->recordIds['newCategoryId']], self::TABLE_Content => [$this->recordIds['newContentId']], ]); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -159,7 +154,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Category => [$this->recordIds['newCategoryId']], ]); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createCategoryNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNCreateRelation.csv'); } /** @@ -172,7 +167,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Category => [$this->recordIds['newCategoryId']], self::TABLE_Content => [$this->recordIds['newContentId']], ]); - $this->assertAssertionDataSet('createContentWCategoryNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWCategoryNAddRelation.csv'); } /** @@ -185,7 +180,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentId']], self::TABLE_Category => [$this->recordIds['newCategoryId']], ]); - $this->assertAssertionDataSet('createCategoryWContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryWContentNAddRelation.csv'); } /** @@ -195,7 +190,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyCategoryOfRelation(); $this->actionService->publishRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst); - $this->assertAssertionDataSet('modifyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -211,7 +206,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -229,7 +224,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst], self::TABLE_Category => [self::VALUE_CategoryIdFirst], ]); - $this->assertAssertionDataSet('modifyBothsOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothsOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -247,7 +242,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -262,7 +257,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteCategoryOfRelation(); $this->actionService->publishRecord(self::TABLE_Category, self::VALUE_CategoryIdFirst); - $this->assertAssertionDataSet('deleteCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -278,7 +273,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -294,7 +289,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyCategoryOfRelation(); $this->actionService->publishRecord(self::TABLE_Category, $this->recordIds['newCategoryId']); - $this->assertAssertionDataSet('copyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -310,7 +305,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -329,7 +324,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecord(self::TABLE_Page, $translatedPageResult[self::TABLE_Page][self::VALUE_PageId]); parent::localizeCategoryOfRelation(); $this->actionService->publishRecord(self::TABLE_Category, $this->recordIds['localizedCategoryId']); - $this->assertAssertionDataSet('localizeCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -345,7 +340,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentOfRelationToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -364,7 +359,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Page => [$this->recordIds['newPageId']], self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']], ]); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/ActionTest.php index 94f64cf60430..c9690d36c120 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/ManyToMany/PublishAll/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase { parent::addCategoryRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('addCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteCategoryRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteCategoryRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -82,7 +77,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeCategoryRelationSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeCategoryRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeCategoryRelationSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -98,7 +93,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndAddRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -116,7 +111,7 @@ class ActionTest extends AbstractActionTestCase { parent::createCategoryAndAddRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createCategoryNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNAddRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -134,7 +129,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndCreateRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -152,7 +147,7 @@ class ActionTest extends AbstractActionTestCase { parent::createCategoryAndCreateRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createCategoryNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryNCreateRelation.csv'); } /** @@ -162,7 +157,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentWithCategoryAndAddRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentWCategoryNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentWCategoryNAddRelation.csv'); } /** @@ -172,7 +167,7 @@ class ActionTest extends AbstractActionTestCase { parent::createCategoryWithContentAndAddRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createCategoryWContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createCategoryWContentNAddRelation.csv'); } /** @@ -182,7 +177,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyCategoryOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -198,7 +193,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -213,7 +208,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyBothsOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyBothsOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothsOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -231,7 +226,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -246,7 +241,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteCategoryOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -262,7 +257,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -278,7 +273,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyCategoryOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -294,7 +289,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -312,7 +307,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeCategoryOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeCategoryOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeCategoryOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -328,7 +323,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentOfRelationToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -344,7 +339,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php index d8a993657e0d..742921086891 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/AbstractActionTestCase.php @@ -22,30 +22,18 @@ namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Regular; */ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\Regular\AbstractActionTestCase { - const VALUE_ParentPageId = 88; - const VALUE_ContentIdZero = 296; + protected const VALUE_ParentPageId = 88; + protected const VALUE_ContentIdZero = 296; - const VALUE_ContentIdTenth = 310; - const VALUE_ContentIdTenthLocalized = 311; - const VALUE_ContentIdTenthLocalized2 = 312; + protected const VALUE_ContentIdTenth = 310; + protected const VALUE_ContentIdTenthLocalized = 311; + protected const VALUE_ContentIdTenthLocalized2 = 312; - const VALUE_WorkspaceId = 1; + protected const VALUE_WorkspaceId = 1; - /** - * @var array - */ - protected $coreExtensionsToLoad = ['workspaces']; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; - protected function setUp(): void - { - parent::setUp(); - $this->setWorkspaceId(self::VALUE_WorkspaceId); - } + protected $coreExtensionsToLoad = ['workspaces']; public function createContentAndCopyContent(): void { diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Discard/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Discard/ActionTest.php index 56f818d9f19e..a65c70251119 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Discard/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Discard/ActionTest.php @@ -24,11 +24,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Regular\AbstractActionTes */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Discard/DataSet/'; - /** * @test */ @@ -49,7 +44,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']], ] ); - $this->assertAssertionDataSet('createContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContents.csv'); } /** @@ -60,7 +55,7 @@ class ActionTest extends AbstractActionTestCase parent::createContentAndCopyContent(); // discard copied content $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['versionedCopiedContentId']); - $this->assertAssertionDataSet('createContentAndCopyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndCopyContent.csv'); } /** @@ -71,7 +66,7 @@ class ActionTest extends AbstractActionTestCase parent::createContentAndLocalize(); // discard default language content $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentAndLocalize'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndLocalize.csv'); } /** @@ -81,7 +76,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); } /** @@ -91,7 +86,7 @@ class ActionTest extends AbstractActionTestCase { parent::hideContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('hideContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/hideContent.csv'); } /** @@ -102,7 +97,7 @@ class ActionTest extends AbstractActionTestCase parent::hideContent(); parent::moveContentToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('hideContentAndMoveToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/hideContentAndMoveToDifferentPage.csv'); } /** @@ -112,7 +107,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); } /** @@ -124,7 +119,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::deleteLocalizedContentAndDeleteContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdThird); - $this->assertAssertionDataSet('deleteLocalizedContentNDeleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteLocalizedContentNDeleteContent.csv'); } /** @@ -134,7 +129,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); } /** @@ -146,7 +141,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::copyContentToLanguage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('copyContentToLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguage.csv'); } /** @@ -159,7 +154,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::copyContentToLanguageFromNonDefaultLanguage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('copyContentToLanguageFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv'); } /** @@ -171,7 +166,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); } /** @@ -181,7 +176,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentAfterMovedContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentAfterMovedContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentAfterMovedContent.csv'); } /** @@ -191,7 +186,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentAfterMovedInLiveContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentAfterMovedInLiveContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentAfterMovedInLiveContent.csv'); } /** @@ -204,7 +199,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::localizeContentFromNonDefaultLanguage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentFromNonDefaultLanguage.csv'); } /** @@ -214,7 +209,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); } /** @@ -224,7 +219,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSortingAfterSelf(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeContentSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingAfterSelf.csv'); } /** @@ -236,7 +231,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); // Note the deleted=1 records are NOT discarded. This is ok since deleted=1 means "not seen in backend", // so it is also ignored by the discard operation. - $this->assertAssertionDataSet('changeContentSortingNDeleteMovedRecord'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingNDeleteMovedRecord.csv'); } /** @@ -248,7 +243,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); // Note the deleted=1 records are NOT discarded. This is ok since deleted=1 means "not seen in backend", // so it is also ignored by the discard operation. - $this->assertAssertionDataSet('changeContentSortingNDeleteLiveRecord'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingNDeleteLiveRecord.csv'); } /** @@ -258,7 +253,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); } /** @@ -270,7 +265,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdSecond], ]); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); } /** @@ -280,7 +275,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPageAndHide(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('moveContentToDifferentPageAndHide'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageAndHide.csv'); } /** @@ -294,7 +289,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('createPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPage.csv'); } /** @@ -304,7 +299,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndSubPageAndSubPageContent(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('createPageAndSubPageAndSubPageContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndSubPageAndSubPageContent.csv'); } /** @@ -314,7 +309,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); } /** @@ -324,7 +319,7 @@ class ActionTest extends AbstractActionTestCase { parent::deletePage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); } /** @@ -334,7 +329,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentAndPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('deleteContentAndPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentAndPage.csv'); } /** @@ -346,7 +341,7 @@ class ActionTest extends AbstractActionTestCase parent::localizePageAndContentsAndDeletePageLocalization(); // Deleted records are not discarded $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageAndContentsAndDeletePageLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageAndContentsAndDeletePageLocalization.csv'); } /** @@ -357,7 +352,7 @@ class ActionTest extends AbstractActionTestCase parent::localizeNestedPagesAndContents(); // Should discard the localized parent page and its content elements, but no sub page change or default lang content element $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedParentPageId']); - $this->assertAssertionDataSet('localizeNestedPagesAndContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNestedPagesAndContents.csv'); } /** @@ -367,7 +362,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); } /** @@ -377,7 +372,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyPageFreeMode(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('copyPageFreeMode'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageFreeMode.csv'); } /** @@ -387,7 +382,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePage.csv'); } /** @@ -397,7 +392,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyFalse(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyFalse.csv'); } /** @@ -407,7 +402,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyFalse(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyFalse.csv'); } /** @@ -417,7 +412,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset.csv'); } /** @@ -427,7 +422,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyDisableHideAtCopyUnset(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopyUnset.csv'); } /** @@ -437,7 +432,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -447,7 +442,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -457,7 +452,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -467,7 +462,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -477,7 +472,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndChangePageSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('createPageAndChangePageSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndChangePageSorting.csv'); } /** @@ -487,7 +482,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndMoveCreatedPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('createPageAndMoveCreatedPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndMoveCreatedPage.csv'); } /** @@ -497,7 +492,7 @@ class ActionTest extends AbstractActionTestCase { parent::changePageSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('changePageSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSorting.csv'); } /** @@ -507,7 +502,7 @@ class ActionTest extends AbstractActionTestCase { parent::changePageSortingAfterSelf(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('changePageSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSortingAfterSelf.csv'); } /** @@ -517,7 +512,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPage.csv'); } /** @@ -527,7 +522,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageToDifferentPageTwice(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageTwice.csv'); } /** @@ -537,7 +532,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedToDifferentPageTwice(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageLocalizedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedToDifferentPageTwice.csv'); } /** @@ -547,7 +542,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedInLiveToDifferentPageTwice(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageLocalizedInLiveToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveToDifferentPageTwice.csv'); } /** @@ -557,7 +552,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice.csv'); } /** @@ -567,7 +562,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice.csv'); } /** @@ -579,7 +574,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Page => [self::VALUE_PageId, self::VALUE_PageIdTarget], ]); - $this->assertAssertionDataSet('movePageToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageNChangeSorting.csv'); } /** @@ -593,7 +588,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Page => [self::VALUE_PageIdTarget, $this->recordIds['newPageId']], ]); - $this->assertAssertionDataSet('movePageToDifferentPageNCreatePageAfterMovedPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageNCreatePageAfterMovedPage.csv'); } /************************************* @@ -610,7 +605,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentId']], self::TABLE_Page => [$this->recordIds['copiedPageId']], ]); - $this->assertAssertionDataSet('createContentAndCopyDraftPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndCopyDraftPage.csv'); } /** @@ -622,7 +617,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->clearWorkspaceRecords([ self::TABLE_Page => [$this->recordIds['newPageId'], $this->recordIds['copiedPageId']], ]); - $this->assertAssertionDataSet('createPageAndCopyDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndCopyDraftParentPage.csv'); } /** @@ -633,7 +628,7 @@ class ActionTest extends AbstractActionTestCase parent::createNestedPagesAndCopyDraftParentPage(); // Discarding only the copied parent page to see what happens with sub pages $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['copiedPageId']); - $this->assertAssertionDataSet('createNestedPagesAndCopyDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNestedPagesAndCopyDraftParentPage.csv'); } /** @@ -643,6 +638,6 @@ class ActionTest extends AbstractActionTestCase { parent::createPlaceholdersAndDeleteDraftParentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Page, $this->recordIds['deletedPageId']); - $this->assertAssertionDataSet('createPlaceholdersAndDeleteDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPlaceholdersAndDeleteDraftParentPage.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php index 673d4f2a48ca..9bd54aaa8eb7 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function createContents(): void { parent::createContents(); - $this->assertAssertionDataSet('createContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContents.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -64,7 +59,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndCopyContent(): void { parent::createContentAndCopyContent(); - $this->assertAssertionDataSet('createContentAndCopyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndCopyContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -81,7 +76,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndLocalize(): void { parent::createContentAndLocalize(); - $this->assertAssertionDataSet('createContentAndLocalize'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndLocalize.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -98,7 +93,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContent(): void { parent::modifyContent(); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -115,7 +110,7 @@ class ActionTest extends AbstractActionTestCase public function hideContent(): void { parent::hideContent(); - $this->assertAssertionDataSet('hideContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/hideContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -133,7 +128,7 @@ class ActionTest extends AbstractActionTestCase { parent::hideContent(); parent::moveContentToDifferentPage(); - $this->assertAssertionDataSet('hideContentAndMoveToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/hideContentAndMoveToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -159,7 +154,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContent(): void { parent::deleteContent(); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -180,7 +175,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::deleteLocalizedContentAndDeleteContent(); - $this->assertAssertionDataSet('deleteLocalizedContentNDeleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteLocalizedContentNDeleteContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -199,7 +194,7 @@ class ActionTest extends AbstractActionTestCase public function copyContent(): void { parent::copyContent(); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -218,7 +213,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::copyContentToLanguage(); - $this->assertAssertionDataSet('copyContentToLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguage.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -242,7 +237,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::copyContentToLanguageFromNonDefaultLanguage(); - $this->assertAssertionDataSet('copyContentToLanguageFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv'); // Set up "de" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -265,7 +260,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeContent(); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -282,7 +277,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentAfterMovedContent(): void { parent::localizeContentAfterMovedContent(); - $this->assertAssertionDataSet('localizeContentAfterMovedContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentAfterMovedContent.csv'); } /** @@ -291,7 +286,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentAfterMovedInLiveContent(): void { parent::localizeContentAfterMovedInLiveContent(); - $this->assertAssertionDataSet('localizeContentAfterMovedInLiveContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentAfterMovedInLiveContent.csv'); } /** @@ -301,7 +296,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentWithEmptyTcaIntegrityColumns(): void { parent::localizeContentWithEmptyTcaIntegrityColumns(); - $this->assertAssertionDataSet('localizeContentWithEmptyTcaIntegrityColumns'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentWithEmptyTcaIntegrityColumns.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), (new InternalRequestContext())->withBackendUserId(self::VALUE_BackendUserId)->withWorkspaceId(self::VALUE_WorkspaceId) @@ -319,7 +314,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeContentWithHideAtCopy(); - $this->assertAssertionDataSet('localizeContentWHideAtCopy'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentWHideAtCopy.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -340,7 +335,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::localizeContentFromNonDefaultLanguage(); - $this->assertAssertionDataSet('localizeContentFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentFromNonDefaultLanguage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond), @@ -358,7 +353,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentFromNonDefaultLanguageWithAllContentElements(): void { parent::localizeContentFromNonDefaultLanguageWithAllContentElements(); - $this->assertAssertionDataSet('localizeContentFromNonDefaultLanguageWithAllContentElements'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentFromNonDefaultLanguageWithAllContentElements.csv'); } /** @@ -367,7 +362,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSorting(): void { parent::changeContentSorting(); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -384,7 +379,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSortingAfterSelf(): void { parent::changeContentSortingAfterSelf(); - $this->assertAssertionDataSet('changeContentSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingAfterSelf.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -402,7 +397,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSortingAndDeleteMovedRecord(): void { parent::changeContentSortingAndDeleteMovedRecord(); - $this->assertAssertionDataSet('changeContentSortingNDeleteMovedRecord'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingNDeleteMovedRecord.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -419,7 +414,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSortingAndDeleteLiveRecord(): void { parent::changeContentSortingAndDeleteLiveRecord(); - $this->assertAssertionDataSet('changeContentSortingNDeleteLiveRecord'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingNDeleteLiveRecord.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -438,7 +433,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentToDifferentPage(): void { parent::moveContentToDifferentPage(); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -462,7 +457,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentToDifferentPageAndChangeSorting(): void { parent::moveContentToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -479,7 +474,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentToDifferentPageAndHide(): void { parent::moveContentToDifferentPageAndHide(); - $this->assertAssertionDataSet('moveContentToDifferentPageAndHide'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageAndHide.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -500,7 +495,7 @@ class ActionTest extends AbstractActionTestCase public function createPage(): void { parent::createPage(); - $this->assertAssertionDataSet('createPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['newPageId']), @@ -517,7 +512,7 @@ class ActionTest extends AbstractActionTestCase public function createPageAndSubPageAndSubPageContent(): void { parent::createPageAndSubPageAndSubPageContent(); - $this->assertAssertionDataSet('createPageAndSubPageAndSubPageContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndSubPageAndSubPageContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['newSubPageId']), @@ -534,7 +529,7 @@ class ActionTest extends AbstractActionTestCase public function createPageAndContentWithTcaDefaults(): void { parent::createPageAndContentWithTcaDefaults(); - $this->assertAssertionDataSet('createPageNContentWDefaults'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageNContentWDefaults.csv'); // first, assert that page cannot be opened without using backend user (since it's hidden) $response = $this->executeFrontendSubRequest( @@ -565,7 +560,7 @@ class ActionTest extends AbstractActionTestCase public function modifyPage(): void { parent::modifyPage(); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -582,7 +577,7 @@ class ActionTest extends AbstractActionTestCase public function deletePage(): void { parent::deletePage(); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -597,7 +592,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContentAndPage(): void { parent::deleteContentAndPage(); - $this->assertAssertionDataSet('deleteContentAndPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentAndPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -614,7 +609,7 @@ class ActionTest extends AbstractActionTestCase { // Create localized page and localize content elements first parent::localizePageAndContentsAndDeletePageLocalization(); - $this->assertAssertionDataSet('localizePageAndContentsAndDeletePageLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageAndContentsAndDeletePageLocalization.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['localizedPageId']), @@ -629,7 +624,7 @@ class ActionTest extends AbstractActionTestCase public function localizeNestedPagesAndContents(): void { parent::localizeNestedPagesAndContents(); - $this->assertAssertionDataSet('localizeNestedPagesAndContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNestedPagesAndContents.csv'); } /** @@ -638,7 +633,7 @@ class ActionTest extends AbstractActionTestCase public function copyPage(): void { parent::copyPage(); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['newPageId']), @@ -655,7 +650,7 @@ class ActionTest extends AbstractActionTestCase public function copyPageFreeMode(): void { parent::copyPageFreeMode(); - $this->assertAssertionDataSet('copyPageFreeMode'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageFreeMode.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['newPageId']), @@ -674,7 +669,7 @@ class ActionTest extends AbstractActionTestCase public function localizePage(): void { parent::localizePage(); - $this->assertAssertionDataSet('localizePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -691,7 +686,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageHiddenHideAtCopyFalse(): void { parent::localizePageHiddenHideAtCopyFalse(); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyFalse.csv'); } /** @@ -700,7 +695,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageNotHiddenHideAtCopyFalse(): void { parent::localizePageNotHiddenHideAtCopyFalse(); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyFalse.csv'); } /** @@ -709,7 +704,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset(): void { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset(); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset.csv'); } /** @@ -718,7 +713,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageHiddenHideAtCopyDisableHideAtCopyUnset(): void { parent::localizePageHiddenHideAtCopyDisableHideAtCopyUnset(); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopyUnset.csv'); } /** @@ -727,7 +722,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse(): void { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse(); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -736,7 +731,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse(): void { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse(); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -745,7 +740,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue(): void { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue(); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -754,7 +749,7 @@ class ActionTest extends AbstractActionTestCase public function localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue(): void { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue(); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -763,7 +758,7 @@ class ActionTest extends AbstractActionTestCase public function createPageAndChangePageSorting(): void { parent::createPageAndChangePageSorting(); - $this->assertAssertionDataSet('createPageAndChangePageSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndChangePageSorting.csv'); } /** @@ -772,7 +767,7 @@ class ActionTest extends AbstractActionTestCase public function createPageAndMoveCreatedPage(): void { parent::createPageAndMoveCreatedPage(); - $this->assertAssertionDataSet('createPageAndMoveCreatedPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndMoveCreatedPage.csv'); } /** @@ -781,7 +776,7 @@ class ActionTest extends AbstractActionTestCase public function changePageSorting(): void { parent::changePageSorting(); - $this->assertAssertionDataSet('changePageSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -800,7 +795,7 @@ class ActionTest extends AbstractActionTestCase public function changePageSortingAfterSelf(): void { parent::changePageSortingAfterSelf(); - $this->assertAssertionDataSet('changePageSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSortingAfterSelf.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -819,7 +814,7 @@ class ActionTest extends AbstractActionTestCase public function movePageToDifferentPage(): void { parent::movePageToDifferentPage(); - $this->assertAssertionDataSet('movePageToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -838,7 +833,7 @@ class ActionTest extends AbstractActionTestCase public function movePageToDifferentPageTwice(): void { parent::movePageToDifferentPageTwice(); - $this->assertAssertionDataSet('movePageToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageTwice.csv'); } /** @@ -847,7 +842,7 @@ class ActionTest extends AbstractActionTestCase public function movePageLocalizedToDifferentPageTwice(): void { parent::movePageLocalizedToDifferentPageTwice(); - $this->assertAssertionDataSet('movePageLocalizedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedToDifferentPageTwice.csv'); } /** @@ -856,7 +851,7 @@ class ActionTest extends AbstractActionTestCase public function movePageLocalizedInLiveToDifferentPageTwice(): void { parent::movePageLocalizedInLiveToDifferentPageTwice(); - $this->assertAssertionDataSet('movePageLocalizedInLiveToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveToDifferentPageTwice.csv'); } /** @@ -865,7 +860,7 @@ class ActionTest extends AbstractActionTestCase public function movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice(): void { parent::movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice(); - $this->assertAssertionDataSet('movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice.csv'); } /** @@ -874,7 +869,7 @@ class ActionTest extends AbstractActionTestCase public function movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice(): void { parent::movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice(); - $this->assertAssertionDataSet('movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice.csv'); } /** @@ -883,7 +878,7 @@ class ActionTest extends AbstractActionTestCase public function movePageToDifferentPageAndChangeSorting(): void { parent::movePageToDifferentPageAndChangeSorting(); - $this->assertAssertionDataSet('movePageToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -912,7 +907,7 @@ class ActionTest extends AbstractActionTestCase public function movePageToDifferentPageAndCreatePageAfterMovedPage(): void { parent::movePageToDifferentPageAndCreatePageAfterMovedPage(); - $this->assertAssertionDataSet('movePageToDifferentPageNCreatePageAfterMovedPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageNCreatePageAfterMovedPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdWebsite), @@ -934,7 +929,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndCopyDraftPage(): void { parent::createContentAndCopyDraftPage(); - $this->assertAssertionDataSet('createContentAndCopyDraftPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndCopyDraftPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); self::assertStringContainsString('The requested page does not exist', (string)$response->getBody()); @@ -954,7 +949,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndCopyLivePage(): void { parent::createContentAndCopyLivePage(); - $this->assertAssertionDataSet('createContentAndCopyLivePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndCopyLivePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); $responseSectionsLive = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -975,7 +970,7 @@ class ActionTest extends AbstractActionTestCase public function createPageAndCopyDraftParentPage(): void { parent::createPageAndCopyDraftParentPage(); - $this->assertAssertionDataSet('createPageAndCopyDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndCopyDraftParentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); self::assertStringContainsString('The requested page does not exist', (string)$response->getBody()); @@ -995,7 +990,7 @@ class ActionTest extends AbstractActionTestCase public function createPageAndCopyLiveParentPage(): void { parent::createPageAndCopyLiveParentPage(); - $this->assertAssertionDataSet('createPageAndCopyLiveParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndCopyLiveParentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); $responseSectionsLive = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -1017,7 +1012,7 @@ class ActionTest extends AbstractActionTestCase public function createNestedPagesAndCopyDraftParentPage(): void { parent::createNestedPagesAndCopyDraftParentPage(); - $this->assertAssertionDataSet('createNestedPagesAndCopyDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNestedPagesAndCopyDraftParentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); self::assertStringContainsString('The requested page does not exist', (string)$response->getBody()); @@ -1037,7 +1032,7 @@ class ActionTest extends AbstractActionTestCase public function createNestedPagesAndCopyLiveParentPage(): void { parent::createNestedPagesAndCopyLiveParentPage(); - $this->assertAssertionDataSet('createNestedPagesAndCopyLiveParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNestedPagesAndCopyLiveParentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); $responseSectionsLive = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -1059,7 +1054,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContentAndCopyDraftPage(): void { parent::deleteContentAndCopyDraftPage(); - $this->assertAssertionDataSet('deleteContentAndCopyDraftPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentAndCopyDraftPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); self::assertStringContainsString('The requested page does not exist', (string)$response->getBody()); @@ -1079,7 +1074,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContentAndCopyLivePage(): void { parent::deleteContentAndCopyLivePage(); - $this->assertAssertionDataSet('deleteContentAndCopyLivePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentAndCopyLivePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); $responseSectionsLive = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -1101,7 +1096,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSortingAndCopyDraftPage(): void { parent::changeContentSortingAndCopyDraftPage(); - $this->assertAssertionDataSet('changeContentSortingAndCopyDraftPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingAndCopyDraftPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); self::assertStringContainsString('The requested page does not exist', (string)$response->getBody()); @@ -1121,7 +1116,7 @@ class ActionTest extends AbstractActionTestCase public function changeContentSortingAndCopyLivePage(): void { parent::changeContentSortingAndCopyLivePage(); - $this->assertAssertionDataSet('changeContentSortingAndCopyLivePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingAndCopyLivePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); $responseSectionsLive = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -1143,7 +1138,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentAndCopyDraftPage(): void { parent::moveContentAndCopyDraftPage(); - $this->assertAssertionDataSet('moveContentAndCopyDraftPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentAndCopyDraftPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); self::assertStringContainsString('The requested page does not exist', (string)$response->getBody()); @@ -1165,7 +1160,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentAndCopyLivePage(): void { parent::moveContentAndCopyLivePage(); - $this->assertAssertionDataSet('moveContentAndCopyLivePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentAndCopyLivePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['copiedPageId'])); $responseSectionsLive = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -1190,7 +1185,7 @@ class ActionTest extends AbstractActionTestCase public function createPlaceholdersAndDeleteDraftParentPage(): void { parent::createPlaceholdersAndDeleteDraftParentPage(); - $this->assertAssertionDataSet('createPlaceholdersAndDeleteDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPlaceholdersAndDeleteDraftParentPage.csv'); } /** @@ -1200,7 +1195,7 @@ class ActionTest extends AbstractActionTestCase public function createPlaceholdersAndDeleteLiveParentPage(): void { parent::createPlaceholdersAndDeleteLiveParentPage(); - $this->assertAssertionDataSet('createPlaceholdersAndDeleteLiveParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPlaceholdersAndDeleteLiveParentPage.csv'); } /** @@ -1214,11 +1209,11 @@ class ActionTest extends AbstractActionTestCase // Have a hidden live content element $this->setWorkspaceId(0); $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized, ['hidden' => 1]); - $this->setWorkspaceId(self::VALUE_WorkspaceId); + $this->setWorkspaceId(static::VALUE_WorkspaceId); // Create a non-hidden workspace overlay $this->actionService->modifyRecord(self::TABLE_Content, self::VALUE_ContentIdThirdLocalized, ['hidden' => 0]); // Confirm db state is as expected for this scenario - $this->assertAssertionDataSet('createLocalizedNotHiddenWorkspaceContentHiddenInLive'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createLocalizedNotHiddenWorkspaceContentHiddenInLive.csv'); // Get the FE preview and verify content element is shown $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/ActionTest.php index fdb280088aed..5d40e2122c3c 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/Publish/DataSet/'; - /** * @test */ @@ -53,7 +48,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']], ] ); - $this->assertAssertionDataSet('createContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContents.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -69,7 +64,7 @@ class ActionTest extends AbstractActionTestCase parent::createContentAndCopyContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('createContentAndCopyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndCopyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -85,7 +80,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContent(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -100,7 +95,7 @@ class ActionTest extends AbstractActionTestCase { parent::hideContent(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('hideContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/hideContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -119,7 +114,7 @@ class ActionTest extends AbstractActionTestCase parent::hideContent(); parent::moveContentToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('hideContentAndMoveToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/hideContentAndMoveToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -146,7 +141,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContent(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -170,7 +165,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdThird, self::VALUE_ContentIdThirdLocalized], ] ); - $this->assertAssertionDataSet('deleteLocalizedContentNDeleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteLocalizedContentNDeleteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -185,7 +180,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -203,7 +198,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecord(self::TABLE_Page, $translatedPageResult[self::TABLE_Page][self::VALUE_PageId]); parent::copyContentToLanguage(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('copyContentToLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguage.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -225,7 +220,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecord(self::TABLE_Page, $translatedPageResult[self::TABLE_Page][self::VALUE_PageId]); parent::copyContentToLanguageFromNonDefaultLanguage(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('copyContentToLanguageFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -247,7 +242,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecord(self::TABLE_Page, $translatedPageResult[self::TABLE_Page][self::VALUE_PageId]); parent::localizeContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -262,7 +257,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentAfterMovedContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentAfterMovedContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentAfterMovedContent.csv'); } /** @@ -272,7 +267,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentAfterMovedInLiveContent(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentAfterMovedInLiveContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentAfterMovedInLiveContent.csv'); } /** @@ -285,7 +280,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecord(self::TABLE_Page, $translatedPageResult[self::TABLE_Page][self::VALUE_PageId]); parent::localizeContentFromNonDefaultLanguage(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentFromNonDefaultLanguage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -300,7 +295,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSorting(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -315,7 +310,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSortingAfterSelf(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeContentSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingAfterSelf.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -333,7 +328,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSectionsSource = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -354,7 +349,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecords([ self::TABLE_Content => [self::VALUE_ContentIdFirst, self::VALUE_ContentIdSecond], ]); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -369,7 +364,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPageAndHide(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdSecond); - $this->assertAssertionDataSet('moveContentToDifferentPageAndHide'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageAndHide.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -391,7 +386,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPage(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('createPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -406,7 +401,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndSubPageAndSubPageContent(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('createPageAndSubPageAndSubPageContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndSubPageAndSubPageContent.csv'); // Sub page is not published together with parent page $response = $this->executeFrontendSubRequest( @@ -425,7 +420,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyPage(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -440,7 +435,7 @@ class ActionTest extends AbstractActionTestCase { parent::deletePage(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId) @@ -455,7 +450,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentAndPage(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('deleteContentAndPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentAndPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId) @@ -471,7 +466,7 @@ class ActionTest extends AbstractActionTestCase parent::localizeNestedPagesAndContents(); // Will publish only the page translation, not it's content elements $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedParentPageId']); - $this->assertAssertionDataSet('localizeNestedPagesAndContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNestedPagesAndContents.csv'); } /** @@ -486,7 +481,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentIdFirst'], $this->recordIds['newContentIdLast']], ] ); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -506,7 +501,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentIdTenth'], $this->recordIds['newContentIdTenthLocalized'], $this->recordIds['newContentIdTenthLocalized2']], ] ); - $this->assertAssertionDataSet('copyPageFreeMode'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageFreeMode.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -523,7 +518,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePage(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -538,7 +533,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyFalse(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyFalse.csv'); } /** @@ -548,7 +543,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyFalse(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyFalse.csv'); } /** @@ -558,7 +553,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset.csv'); } /** @@ -568,7 +563,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyDisableHideAtCopyUnset(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopyUnset.csv'); } /** @@ -578,7 +573,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -588,7 +583,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -598,7 +593,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -608,7 +603,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['localizedPageId']); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -618,7 +613,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndChangePageSorting(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('createPageAndChangePageSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndChangePageSorting.csv'); } /** @@ -628,7 +623,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndMoveCreatedPage(); $this->actionService->publishRecord(self::TABLE_Page, $this->recordIds['newPageId']); - $this->assertAssertionDataSet('createPageAndMoveCreatedPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndMoveCreatedPage.csv'); } /** @@ -638,7 +633,7 @@ class ActionTest extends AbstractActionTestCase { parent::changePageSorting(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('changePageSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -655,7 +650,7 @@ class ActionTest extends AbstractActionTestCase { parent::changePageSortingAfterSelf(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('changePageSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSortingAfterSelf.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -672,7 +667,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -689,7 +684,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageToDifferentPageTwice(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageTwice.csv'); } /** @@ -699,7 +694,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedToDifferentPageTwice(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageLocalizedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedToDifferentPageTwice.csv'); } /** @@ -709,7 +704,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedInLiveToDifferentPageTwice(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageLocalizedInLiveToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveToDifferentPageTwice.csv'); } /** @@ -719,7 +714,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice.csv'); } /** @@ -729,7 +724,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_PageId); - $this->assertAssertionDataSet('movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice.csv'); } /** @@ -741,7 +736,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecords([ self::TABLE_Page => [self::VALUE_PageId, self::VALUE_PageIdTarget], ]); - $this->assertAssertionDataSet('movePageToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSectionsPage = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -767,7 +762,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecords([ self::TABLE_Page => [self::VALUE_PageIdTarget, $this->recordIds['newPageId']], ]); - $this->assertAssertionDataSet('movePageToDifferentPageNCreatePageAfterMovedPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageNCreatePageAfterMovedPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdWebsite)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -783,7 +778,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSortingAndCopyDraftPage(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeContentSortingAndCopyDraftPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingAndCopyDraftPage.csv'); } /** @@ -796,7 +791,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentId']], self::TABLE_Page => [$this->recordIds['copiedPageId']], ]); - $this->assertAssertionDataSet('createContentAndCopyDraftPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndCopyDraftPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['copiedPageId']), @@ -816,7 +811,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecords([ self::TABLE_Content => [$this->recordIds['newContentId']], ]); - $this->assertAssertionDataSet('createContentAndLocalize'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndLocalize.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -836,7 +831,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecords([ self::TABLE_Page => [$this->recordIds['newPageId'], $this->recordIds['copiedPageId']], ]); - $this->assertAssertionDataSet('createPageAndCopyDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndCopyDraftParentPage.csv'); } /** @@ -846,6 +841,6 @@ class ActionTest extends AbstractActionTestCase { parent::createPlaceholdersAndDeleteDraftParentPage(); $this->actionService->publishRecord(self::TABLE_Page, self::VALUE_ParentPageId); - $this->assertAssertionDataSet('createPlaceholdersAndDeleteDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPlaceholdersAndDeleteDraftParentPage.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/ActionTest.php index d90a7b778d39..204ae3a9790f 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Regular/PublishAll/DataSet/'; - /** * @test */ @@ -49,7 +44,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContents(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContents.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -64,7 +59,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndCopyContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentAndCopyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndCopyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -80,7 +75,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -95,7 +90,7 @@ class ActionTest extends AbstractActionTestCase { parent::hideContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('hideContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/hideContent.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -114,7 +109,7 @@ class ActionTest extends AbstractActionTestCase parent::hideContent(); parent::moveContentToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('hideContentAndMoveToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/hideContentAndMoveToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -141,7 +136,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -160,7 +155,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::deleteLocalizedContentAndDeleteContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteLocalizedContentNDeleteContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteLocalizedContentNDeleteContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -177,7 +172,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -194,7 +189,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::copyContentToLanguage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyContentToLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguage.csv'); // Set up "dk" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -215,7 +210,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::copyContentToLanguageFromNonDefaultLanguage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyContentToLanguageFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentToLanguageFromNonDefaultLanguage.csv'); // Set up "de" to not have overlays $languageConfiguration = $this->siteLanguageConfiguration; @@ -236,7 +231,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -251,7 +246,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentAfterMovedContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContentAfterMovedContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentAfterMovedContent.csv'); } /** @@ -261,7 +256,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentAfterMovedInLiveContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContentAfterMovedInLiveContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentAfterMovedInLiveContent.csv'); } /** @@ -273,7 +268,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage(self::TABLE_Page, self::VALUE_PageId, self::VALUE_LanguageIdSecond); parent::localizeContentFromNonDefaultLanguage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContentFromNonDefaultLanguage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentFromNonDefaultLanguage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageIdSecond)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -288,7 +283,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeContentSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -303,7 +298,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSortingAfterSelf(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeContentSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingAfterSelf.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -318,7 +313,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveContentToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSectionsSource = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -337,7 +332,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPageAndChangeSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveContentToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -352,7 +347,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentToDifferentPageAndHide(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveContentToDifferentPageAndHide'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentToDifferentPageAndHide.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -374,7 +369,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -389,7 +384,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndSubPageAndSubPageContent(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createPageAndSubPageAndSubPageContent'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndSubPageAndSubPageContent.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newSubPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -404,7 +399,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -419,7 +414,7 @@ class ActionTest extends AbstractActionTestCase { parent::deletePage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deletePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletePage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId) @@ -434,7 +429,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentAndPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteContentAndPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentAndPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId) @@ -450,7 +445,7 @@ class ActionTest extends AbstractActionTestCase // Create localized page and localize content elements first parent::localizePageAndContentsAndDeletePageLocalization(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePageAndContentsAndDeletePageLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageAndContentsAndDeletePageLocalization.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['localizedPageId']), @@ -466,7 +461,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeNestedPagesAndContents(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeNestedPagesAndContents'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeNestedPagesAndContents.csv'); } /** @@ -476,7 +471,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -491,7 +486,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyPageFreeMode(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyPageFreeMode'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyPageFreeMode.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId($this->recordIds['newPageId'])); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -508,7 +503,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -523,7 +518,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyFalse(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyFalse.csv'); } /** @@ -533,7 +528,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyFalse(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyFalse.csv'); } /** @@ -543,7 +538,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopyUnset.csv'); } /** @@ -553,7 +548,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyDisableHideAtCopyUnset(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopyUnset'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopyUnset.csv'); } /** @@ -563,7 +558,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -573,7 +568,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToFalse.csv'); } /** @@ -583,7 +578,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageNotHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -593,7 +588,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizePageHiddenHideAtCopyDisableHideAtCopySetToTrue.csv'); } /** @@ -605,7 +600,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndChangePageSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createPageAndChangePageSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndChangePageSorting.csv'); } /** @@ -616,7 +611,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndMoveCreatedPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createPageAndMoveCreatedPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndMoveCreatedPage.csv'); } /** @@ -626,7 +621,7 @@ class ActionTest extends AbstractActionTestCase { parent::changePageSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changePageSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -643,7 +638,7 @@ class ActionTest extends AbstractActionTestCase { parent::changePageSortingAfterSelf(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changePageSortingAfterSelf'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changePageSortingAfterSelf.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -660,7 +655,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('movePageToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -677,7 +672,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageToDifferentPageTwice(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('movePageToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageTwice.csv'); } /** @@ -687,7 +682,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedToDifferentPageTwice(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('movePageLocalizedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedToDifferentPageTwice.csv'); } /** @@ -697,7 +692,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedInLiveToDifferentPageTwice(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('movePageLocalizedInLiveToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveToDifferentPageTwice.csv'); } /** @@ -707,7 +702,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveWorkspaceChangedToDifferentPageTwice.csv'); } /** @@ -717,7 +712,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageLocalizedInLiveWorkspaceDeletedToDifferentPageTwice.csv'); } /** @@ -727,7 +722,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageToDifferentPageAndChangeSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('movePageToDifferentPageNChangeSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageNChangeSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSectionsPage = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -751,7 +746,7 @@ class ActionTest extends AbstractActionTestCase { parent::movePageToDifferentPageAndCreatePageAfterMovedPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('movePageToDifferentPageNCreatePageAfterMovedPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/movePageToDifferentPageNCreatePageAfterMovedPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdWebsite)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -767,7 +762,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndCopyDraftPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentAndCopyDraftPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndCopyDraftPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId($this->recordIds['copiedPageId']), @@ -785,7 +780,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPageAndCopyDraftParentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createPageAndCopyDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPageAndCopyDraftParentPage.csv'); } /** @@ -795,7 +790,7 @@ class ActionTest extends AbstractActionTestCase { parent::createNestedPagesAndCopyDraftParentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createNestedPagesAndCopyDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createNestedPagesAndCopyDraftParentPage.csv'); } /** @@ -805,7 +800,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndLocalize(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentAndLocalize'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentAndLocalize.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -823,7 +818,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeContentSortingAndCopyDraftPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeContentSortingAndCopyDraftPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeContentSortingAndCopyDraftPage.csv'); } /** @@ -833,7 +828,7 @@ class ActionTest extends AbstractActionTestCase { parent::createPlaceholdersAndDeleteDraftParentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createPlaceholdersAndDeleteDraftParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPlaceholdersAndDeleteDraftParentPage.csv'); } /** @@ -843,6 +838,6 @@ class ActionTest extends AbstractActionTestCase { parent::createPlaceholdersAndDeleteLiveParentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createPlaceholdersAndDeleteLiveParentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createPlaceholdersAndDeleteLiveParentPage.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/AbstractActionTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/AbstractActionTestCase.php index 6a7df3462c82..1379d6aff376 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/AbstractActionTestCase.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/AbstractActionTestCase.php @@ -22,21 +22,9 @@ namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select; */ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\Select\AbstractActionTestCase { - const VALUE_WorkspaceId = 1; + protected const VALUE_WorkspaceId = 1; - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; - /** - * @var array - */ protected $coreExtensionsToLoad = ['workspaces']; - - protected function setUp(): void - { - parent::setUp(); - $this->setWorkspaceId(self::VALUE_WorkspaceId); - } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Discard/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Discard/ActionTest.php index d2eb5c170b17..41f1d27216a5 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Discard/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Discard/ActionTest.php @@ -24,11 +24,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\Select\AbstractActionTest */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Discard/DataSet/'; - /** * @test */ @@ -45,7 +40,7 @@ class ActionTest extends AbstractActionTestCase { parent::addElementRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); } /** @@ -55,7 +50,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); } /** @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); } /** @@ -75,7 +70,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementRelationSorting(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); } /** @@ -85,7 +80,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndAddElementRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); } /** @@ -98,7 +93,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentId']], self::TABLE_Element => [$this->recordIds['newElementId']], ]); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); } /** @@ -108,7 +103,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyElementOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); } /** @@ -118,7 +113,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); } /** @@ -131,7 +126,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst], self::TABLE_Element => [self::VALUE_ElementIdFirst], ]); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); } /** @@ -141,7 +136,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); } /** @@ -151,7 +146,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); } /** @@ -161,7 +156,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); } /** @@ -171,7 +166,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyElementOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['copiedElementId']); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); } /** @@ -181,7 +176,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); } /** @@ -193,7 +188,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeElementOfRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, $this->recordIds['localizedElementId']); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); } /** @@ -203,7 +198,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentOfRelationToDifferentPage(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); } /** @@ -213,6 +208,6 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); $this->actionService->clearWorkspaceRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Modify/ActionTest.php index 05c013ee155d..9a076b8a243a 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Modify/ActionTest.php @@ -27,11 +27,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Modify/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase public function addElementRelation(): void { parent::addElementRelation(); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -65,7 +60,7 @@ class ActionTest extends AbstractActionTestCase public function deleteElementRelation(): void { parent::deleteElementRelation(); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -86,7 +81,7 @@ class ActionTest extends AbstractActionTestCase public function changeElementSorting(): void { parent::changeElementSorting(); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -104,7 +99,7 @@ class ActionTest extends AbstractActionTestCase public function changeElementRelationSorting(): void { parent::changeElementRelationSorting(); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -122,7 +117,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndAddElementRelation(): void { parent::createContentAndAddElementRelation(); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -142,7 +137,7 @@ class ActionTest extends AbstractActionTestCase public function createContentAndCreateElementRelation(): void { parent::createContentAndCreateElementRelation(); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -162,7 +157,7 @@ class ActionTest extends AbstractActionTestCase public function modifyElementOfRelation(): void { parent::modifyElementOfRelation(); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -180,7 +175,7 @@ class ActionTest extends AbstractActionTestCase public function modifyContentOfRelation(): void { parent::modifyContentOfRelation(); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -197,7 +192,7 @@ class ActionTest extends AbstractActionTestCase public function modifyBothSidesOfRelation(): void { parent::modifyBothSidesOfRelation(); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -217,7 +212,7 @@ class ActionTest extends AbstractActionTestCase public function deleteContentOfRelation(): void { parent::deleteContentOfRelation(); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -234,7 +229,7 @@ class ActionTest extends AbstractActionTestCase public function deleteElementOfRelation(): void { parent::deleteElementOfRelation(); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -252,7 +247,7 @@ class ActionTest extends AbstractActionTestCase public function copyContentOfRelation(): void { parent::copyContentOfRelation(); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -271,7 +266,7 @@ class ActionTest extends AbstractActionTestCase public function copyElementOfRelation(): void { parent::copyElementOfRelation(); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId), @@ -293,7 +288,7 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelation(): void { parent::localizeContentOfRelation(); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -313,7 +308,7 @@ class ActionTest extends AbstractActionTestCase // Create translated page first $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeElementOfRelation(); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId), @@ -331,7 +326,7 @@ class ActionTest extends AbstractActionTestCase public function moveContentOfRelationToDifferentPage(): void { parent::moveContentOfRelationToDifferentPage(); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest( (new InternalRequest())->withPageId(self::VALUE_PageIdTarget), @@ -349,6 +344,6 @@ class ActionTest extends AbstractActionTestCase public function localizeContentOfRelationWithLocalizeReferencesAtParentLocalization() { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Publish/ActionTest.php index 058872b465dc..c4a7468a4640 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Publish/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/Publish/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase { parent::addElementRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -82,7 +77,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementSorting(); $this->actionService->publishRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -98,7 +93,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementRelationSorting(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -114,7 +109,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndAddElementRelation(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['newContentId']); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -135,7 +130,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [$this->recordIds['newContentId']], self::TABLE_Element => [$this->recordIds['newElementId']], ]); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -153,7 +148,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyElementOfRelation(); $this->actionService->publishRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -169,7 +164,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdFirst); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -187,7 +182,7 @@ class ActionTest extends AbstractActionTestCase self::TABLE_Content => [self::VALUE_ContentIdFirst], self::TABLE_Element => [self::VALUE_ElementIdFirst], ]); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -205,7 +200,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -220,7 +215,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementOfRelation(); $this->actionService->publishRecord(self::TABLE_Element, self::VALUE_ElementIdFirst); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -236,7 +231,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['copiedContentId']); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -253,7 +248,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyElementOfRelation(); $this->actionService->publishRecord(self::TABLE_Element, $this->recordIds['copiedElementId']); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -273,7 +268,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelation(); $this->actionService->publishRecord(self::TABLE_Content, $this->recordIds['localizedContentId']); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -292,7 +287,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->publishRecord('pages', $translatedPageResult['pages'][self::VALUE_PageId]); parent::localizeElementOfRelation(); $this->actionService->publishRecord(self::TABLE_Element, $this->recordIds['localizedElementId']); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -308,7 +303,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentOfRelationToDifferentPage(); $this->actionService->publishRecord(self::TABLE_Content, self::VALUE_ContentIdLast); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -324,6 +319,6 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); $this->actionService->publishRecord(self::TABLE_Content, 299); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/PublishAll/ActionTest.php index 0368a82408bd..13f6208aac9e 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/PublishAll/ActionTest.php @@ -26,11 +26,6 @@ use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent; */ class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/Select/PublishAll/DataSet/'; - /** * @test */ @@ -47,7 +42,7 @@ class ActionTest extends AbstractActionTestCase { parent::addElementRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -63,7 +58,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -82,7 +77,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeElementSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -98,7 +93,7 @@ class ActionTest extends AbstractActionTestCase { parent::changeElementRelationSorting(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('changeElementRelationSorting'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/changeElementRelationSorting.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -114,7 +109,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndAddElementRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentNAddRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNAddRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -132,7 +127,7 @@ class ActionTest extends AbstractActionTestCase { parent::createContentAndCreateElementRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('createContentNCreateRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/createContentNCreateRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -150,7 +145,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyElementOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -166,7 +161,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -181,7 +176,7 @@ class ActionTest extends AbstractActionTestCase { parent::modifyBothSidesOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('modifyBothSidesOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/modifyBothSidesOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -199,7 +194,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -214,7 +209,7 @@ class ActionTest extends AbstractActionTestCase { parent::deleteElementOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('deleteElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deleteElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -230,7 +225,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -247,7 +242,7 @@ class ActionTest extends AbstractActionTestCase { parent::copyElementOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('copyElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/copyElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -267,7 +262,7 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContentOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -285,7 +280,7 @@ class ActionTest extends AbstractActionTestCase $this->actionService->copyRecordToLanguage('pages', self::VALUE_PageId, self::VALUE_LanguageId); parent::localizeElementOfRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeElementOfRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeElementOfRelation.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageId)->withLanguageId(self::VALUE_LanguageId)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -301,7 +296,7 @@ class ActionTest extends AbstractActionTestCase { parent::moveContentOfRelationToDifferentPage(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('moveContentOfRelationToDifferentPage'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/moveContentOfRelationToDifferentPage.csv'); $response = $this->executeFrontendSubRequest((new InternalRequest())->withPageId(self::VALUE_PageIdTarget)); $responseSections = ResponseContent::fromString((string)$response->getBody())->getSections(); @@ -317,6 +312,6 @@ class ActionTest extends AbstractActionTestCase { parent::localizeContentOfRelationWithLocalizeReferencesAtParentLocalization(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('localizeContentOfRelationWLocalizeReferencesAtParentLocalization'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/localizeContentOfRelationWLocalizeReferencesAtParentLocalization.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.php index 106908cc3d0d..eca83379ee79 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/AbstractActionTestCase.php @@ -19,21 +19,9 @@ namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\SelectFlex; abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\DataHandling\SelectFlex\AbstractActionTestCase { - const VALUE_WorkspaceId = 1; + protected const VALUE_WorkspaceId = 1; - /** - * @var array - */ - protected $coreExtensionsToLoad = ['workspaces']; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/DataSet/'; + protected const SCENARIO_DataSet = __DIR__ . '/DataSet/ImportDefault.csv'; - protected function setUp(): void - { - parent::setUp(); - $this->setWorkspaceId(self::VALUE_WorkspaceId); - } + protected $coreExtensionsToLoad = ['workspaces']; } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Discard/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Discard/ActionTest.php index aca9024fd303..0ae892aca95e 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Discard/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Discard/ActionTest.php @@ -21,11 +21,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\SelectFlex\AbstractAction class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Discard/DataSet/'; - /** * @test */ @@ -42,6 +37,6 @@ class ActionTest extends AbstractActionTestCase { parent::addElementRelation(); $this->actionService->clearWorkspaceRecord(self::TABLE_Element, self::VALUE_ElementIdSecond); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.php index 5176d7393778..49f6f015d704 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Modify/ActionTest.php @@ -21,11 +21,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\SelectFlex\AbstractAction class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Modify/DataSet/'; - /** * @test */ @@ -41,6 +36,6 @@ class ActionTest extends AbstractActionTestCase public function addElementRelation() { parent::addElementRelation(); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Publish/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Publish/ActionTest.php index 04d2feed3f27..e5c8c5b171db 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Publish/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Publish/ActionTest.php @@ -21,11 +21,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\SelectFlex\AbstractAction class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/Publish/DataSet/'; - /** * @test */ @@ -42,6 +37,6 @@ class ActionTest extends AbstractActionTestCase { parent::addElementRelation(); $this->actionService->publishRecord(self::TABLE_Element, self::VALUE_ElementIdSecond); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/PublishAll/ActionTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/PublishAll/ActionTest.php index 8fb4d7f72424..0dbcd4fc16c4 100644 --- a/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/PublishAll/ActionTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/PublishAll/ActionTest.php @@ -21,11 +21,6 @@ use TYPO3\CMS\Workspaces\Tests\Functional\DataHandling\SelectFlex\AbstractAction class ActionTest extends AbstractActionTestCase { - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/DataHandling/SelectFlex/PublishAll/DataSet/'; - /** * @test */ @@ -42,6 +37,6 @@ class ActionTest extends AbstractActionTestCase { parent::addElementRelation(); $this->actionService->publishWorkspace(self::VALUE_WorkspaceId); - $this->assertAssertionDataSet('addElementRelation'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/addElementRelation.csv'); } } diff --git a/typo3/sysext/workspaces/Tests/Functional/Hook/DataHandlerHookTest.php b/typo3/sysext/workspaces/Tests/Functional/Hook/DataHandlerHookTest.php index 75e1c88537b1..bf47da2e1c8e 100644 --- a/typo3/sysext/workspaces/Tests/Functional/Hook/DataHandlerHookTest.php +++ b/typo3/sysext/workspaces/Tests/Functional/Hook/DataHandlerHookTest.php @@ -30,95 +30,38 @@ use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase; */ class DataHandlerHookTest extends FunctionalTestCase { - /** - * @var array - */ protected $coreExtensionsToLoad = ['workspaces']; - /** - * @var BackendUserAuthentication - */ - protected $backendUser; + protected BackendUserAuthentication $backendUser; + protected ActionService $actionService; - /** - * @var ActionService - */ - protected $actionService; - - /** - * @var string - */ - protected $scenarioDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/Hook/DataSet/'; - - /** - * @var string - */ - protected $assertionDataSetDirectory = 'typo3/sysext/workspaces/Tests/Functional/Hook/DataSet/'; - - /** - * Set up - */ protected function setUp(): void { parent::setUp(); - $this->backendUser = $this->setUpBackendUserFromFixture(1); + $this->backendUser = $this->setUpBackendUserFromFixture(1); Bootstrap::initializeLanguageObject(); - $this->actionService = $this->getActionService(); + $this->actionService = new ActionService(); $this->setWorkspaceId(0); } - /** - * Tear down - */ protected function tearDown(): void { - unset($this->actionService); + unset($this->actionService, $this->backendUser); parent::tearDown(); } - /** - * @param int $workspaceId - */ protected function setWorkspaceId(int $workspaceId): void { $this->backendUser->workspace = $workspaceId; GeneralUtility::makeInstance(Context::class)->setAspect('workspace', new WorkspaceAspect($workspaceId)); } - /** - * @return ActionService - */ - protected function getActionService(): ActionService - { - return GeneralUtility::makeInstance(ActionService::class); - } - - /** - * @param string $dataSetName - */ - protected function importScenarioDataSet($dataSetName): void - { - $fileName = rtrim($this->scenarioDataSetDirectory, '/') . '/' . $dataSetName . '.csv'; - $fileName = GeneralUtility::getFileAbsFileName($fileName); - $this->importCSVDataSet($fileName); - } - - /** - * @param string $dataSetName - */ - protected function assertAssertionDataSet($dataSetName): void - { - $fileName = rtrim($this->assertionDataSetDirectory, '/') . '/' . $dataSetName . '.csv'; - $fileName = GeneralUtility::getFileAbsFileName($fileName); - $this->assertCSVDataSet($fileName); - } - /** * @test */ public function deletingSysWorkspaceDeletesWorkspaceRecords(): void { - $this->importScenarioDataSet('deletingSysWorkspaceDeletesWorkspaceRecords'); + $this->importCSVDataSet(__DIR__ . '/DataSet/deletingSysWorkspaceDeletesWorkspaceRecords.csv'); $this->setWorkspaceId(1); // Create a pages move placeholder uid:93 and a versioned record uid:94 - both should be fully deleted after deleting ws1 @@ -138,6 +81,6 @@ class DataHandlerHookTest extends FunctionalTestCase $this->setWorkspaceId(0); $this->actionService->deleteRecord('sys_workspace', 1); - $this->assertAssertionDataSet('deletingSysWorkspaceDeletesWorkspaceRecordsResult'); + $this->assertCSVDataSet(__DIR__ . '/DataSet/deletingSysWorkspaceDeletesWorkspaceRecordsResult.csv'); } } -- GitLab