[TASK] Remove testing framework from core and use package 83/52283/9
authorSusanne Moog <susanne.moog@typo3.com>
Mon, 27 Mar 2017 19:14:42 +0000 (21:14 +0200)
committerBenni Mack <benni@typo3.org>
Fri, 31 Mar 2017 14:34:11 +0000 (16:34 +0200)
Change-Id: I8e45a13762aa44b2c93dc8acff393c51cd883d94
Resolves: #80606
Releases: master
Reviewed-on: https://review.typo3.org/52283
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
76 files changed:
components/testing_framework/Classes/Core/Acceptance/AcceptanceCoreEnvironment.php [deleted file]
components/testing_framework/Classes/Core/Acceptance/Step/Backend/Admin.php [deleted file]
components/testing_framework/Classes/Core/Acceptance/Step/Backend/Editor.php [deleted file]
components/testing_framework/Classes/Core/Acceptance/Support/Helper/ModalDialog.php [deleted file]
components/testing_framework/Classes/Core/Acceptance/Support/Helper/Topbar.php [deleted file]
components/testing_framework/Classes/Core/Acceptance/Support/Page/PageTree.php [deleted file]
components/testing_framework/Classes/Core/AccessibleObjectInterface.php [deleted file]
components/testing_framework/Classes/Core/BaseTestCase.php [deleted file]
components/testing_framework/Classes/Core/Exception.php [deleted file]
components/testing_framework/Classes/Core/FileStreamWrapper.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/AbstractRecordConstraint.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/AbstractStructureRecordConstraint.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/DoesNotHaveRecordConstraint.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/HasRecordConstraint.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/StructureDoesNotHaveRecordConstraint.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/StructureHasRecordConstraint.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Frontend/Collector.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Frontend/Hook/BackendUserHandler.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Frontend/Hook/FrontendUserHandler.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Frontend/Parser.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Frontend/Renderer.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Frontend/RequestBootstrap.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Frontend/Response.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Frontend/ResponseContent.php [deleted file]
components/testing_framework/Classes/Core/Functional/Framework/Frontend/ResponseSection.php [deleted file]
components/testing_framework/Classes/Core/Functional/FunctionalTestCase.php [deleted file]
components/testing_framework/Classes/Core/Testbase.php [deleted file]
components/testing_framework/Classes/Core/Unit/UnitTestCase.php [deleted file]
components/testing_framework/Classes/Fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php [deleted file]
components/testing_framework/Migrations/Code/ClassAliasMap.php [deleted file]
components/testing_framework/Resources/Core/Acceptance/Fixtures/be_groups.xml [deleted file]
components/testing_framework/Resources/Core/Acceptance/Fixtures/be_sessions.xml [deleted file]
components/testing_framework/Resources/Core/Acceptance/Fixtures/be_users.xml [deleted file]
components/testing_framework/Resources/Core/Acceptance/Fixtures/sys_category.xml [deleted file]
components/testing_framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_extension.xml [deleted file]
components/testing_framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_repository.xml [deleted file]
components/testing_framework/Resources/Core/Build/AcceptanceTests.yml [deleted file]
components/testing_framework/Resources/Core/Build/Configuration/Acceptance/Support/AcceptanceTester.php [deleted file]
components/testing_framework/Resources/Core/Build/Configuration/Acceptance/Support/Helper/Acceptance.php [deleted file]
components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Bootstrap.js [deleted file]
components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Helper.js [deleted file]
components/testing_framework/Resources/Core/Build/Configuration/JSUnit/karma.conf.js [deleted file]
components/testing_framework/Resources/Core/Build/FunctionalTests.xml [deleted file]
components/testing_framework/Resources/Core/Build/FunctionalTestsBootstrap.php [deleted file]
components/testing_framework/Resources/Core/Build/Scripts/splitAcceptanceTests.sh [deleted file]
components/testing_framework/Resources/Core/Build/Scripts/splitFunctionalTests.sh [deleted file]
components/testing_framework/Resources/Core/Build/UnitTests.xml [deleted file]
components/testing_framework/Resources/Core/Build/UnitTestsBootstrap.php [deleted file]
components/testing_framework/Resources/Core/Functional/Fixtures/be_users.xml [deleted file]
components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml [deleted file]
components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml [deleted file]
components/testing_framework/Resources/Core/Functional/Fixtures/sys_language.xml [deleted file]
components/testing_framework/Resources/Core/Functional/Fixtures/tt_content.xml [deleted file]
components/testing_framework/compat/core/AccessibleObjectInterface.php [deleted file]
components/testing_framework/compat/core/BaseTestCase.php [deleted file]
components/testing_framework/compat/core/Exception.php [deleted file]
components/testing_framework/compat/core/FileStreamWrapper.php [deleted file]
components/testing_framework/compat/core/FunctionalTestCase.php [deleted file]
components/testing_framework/compat/core/Testbase.php [deleted file]
components/testing_framework/compat/core/UnitTestCase.php [deleted file]
components/testing_framework/compat/fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php [deleted file]
components/testing_framework/composer.json [deleted file]
composer.json
composer.lock
typo3/sysext/backend/Tests/Functional/Controller/Page/LocalizationControllerTest.php
typo3/sysext/backend/Tests/Functional/Utility/BackendUtilityTest.php
typo3/sysext/core/Tests/Functional/DataHandling/FAL/AbstractActionTestCase.php
typo3/sysext/core/Tests/Functional/Fixtures/Frontend/request.tpl
typo3/sysext/core/Tests/Functional/Resource/ResourceStorageTest.php
typo3/sysext/extbase/Tests/Functional/Persistence/CountTest.php
typo3/sysext/extbase/Tests/Functional/Persistence/EnableFieldsTest.php
typo3/sysext/extbase/Tests/Functional/Persistence/InTest.php
typo3/sysext/extbase/Tests/Functional/Persistence/OperatorTest.php
typo3/sysext/extbase/Tests/Functional/Persistence/RelationTest.php
typo3/sysext/extbase/Tests/Functional/Persistence/TranslationTest.php
typo3/sysext/workspaces/Tests/Functional/Service/WorkspaceServiceTest.php

diff --git a/components/testing_framework/Classes/Core/Acceptance/AcceptanceCoreEnvironment.php b/components/testing_framework/Classes/Core/Acceptance/AcceptanceCoreEnvironment.php
deleted file mode 100644 (file)
index 7dbf205..0000000
+++ /dev/null
@@ -1,297 +0,0 @@
-<?php
-declare(strict_types=1);
-namespace TYPO3\TestingFramework\Core\Acceptance;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use Codeception\Event\SuiteEvent;
-use Codeception\Events;
-use Codeception\Extension;
-use TYPO3\CMS\Core\Cache\Backend\NullBackend;
-use TYPO3\CMS\Core\Core\Bootstrap;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Styleguide\TcaDataGenerator\Generator;
-use TYPO3\TestingFramework\Core\Testbase;
-
-/**
- * This codeception extension creates a full TYPO3 instance within
- * typo3temp. Own acceptance test suites may extend from this class
- * and change the properties. This can be used to not copy the whole
- * bootstrapTypo3Environment() method but reuse it instead.
- */
-class AcceptanceCoreEnvironment extends Extension
-{
-    /**
-     * Additional core extensions to load.
-     *
-     * To be used in own acceptance test suites.
-     *
-     * If a test suite needs additional core extensions, for instance as a dependency of
-     * an extension that is tested, those core extension names can be noted here and will
-     * be loaded.
-     *
-     * @var array
-     */
-    protected $coreExtensionsToLoad = [];
-
-    /**
-     * Array of test/fixture extensions paths that should be loaded for a test.
-     *
-     * To be used in own acceptance test suites.
-     *
-     * Given path is expected to be relative to your document root, example:
-     *
-     * array(
-     *   'typo3conf/ext/some_extension/Tests/Functional/Fixtures/Extensions/test_extension',
-     *   'typo3conf/ext/base_extension',
-     * );
-     *
-     * Extensions in this array are linked to the test instance, loaded
-     * and their ext_tables.sql will be applied.
-     *
-     * @var array
-     */
-    protected $testExtensionsToLoad = [];
-
-    /**
-     * Array of test/fixture folder or file paths that should be linked for a test.
-     *
-     * To be used in own acceptance test suites.
-     *
-     * array(
-     *   'link-source' => 'link-destination'
-     * );
-     *
-     * Given paths are expected to be relative to the test instance root.
-     * The array keys are the source paths and the array values are the destination
-     * paths, example:
-     *
-     * array(
-     *   'typo3/sysext/impext/Tests/Functional/Fixtures/Folders/fileadmin/user_upload' =>
-     *   'fileadmin/user_upload',
-     *   'typo3conf/ext/my_own_ext/Tests/Functional/Fixtures/Folders/uploads/tx_myownext' =>
-     *   'uploads/tx_myownext'
-     * );
-     *
-     * To be able to link from my_own_ext the extension path needs also to be registered in
-     * property $testExtensionsToLoad
-     *
-     * @var array
-     */
-    protected $pathsToLinkInTestInstance = [];
-
-    /**
-     * This configuration array is merged with TYPO3_CONF_VARS
-     * that are set in default configuration and factory configuration
-     *
-     * To be used in own acceptance test suites.
-     *
-     * @var array
-     */
-    protected $configurationToUseInTestInstance = [];
-
-    /**
-     * Array of folders that should be created inside the test instance document root.
-     *
-     * To be used in own acceptance test suites.
-     *
-     * Per default the following folder are created
-     * /fileadmin
-     * /typo3temp
-     * /typo3conf
-     * /typo3conf/ext
-     * /uploads
-     *
-     * To create additional folders add the paths to this array. Given paths are expected to be
-     * relative to the test instance root and have to begin with a slash. Example:
-     *
-     * array(
-     *   'fileadmin/user_upload'
-     * );
-     *
-     * @var array
-     */
-    protected $additionalFoldersToCreate = [];
-
-    /**
-     * XML database fixtures to be loaded into database.
-     *
-     * Given paths are expected to be relative to your document root.
-     *
-     * @var array
-     */
-    protected $xmlDatabaseFixtures = [
-        'components/testing_framework/Resources/Core/Acceptance/Fixtures/be_users.xml',
-        'components/testing_framework/Resources/Core/Acceptance/Fixtures/be_sessions.xml',
-        'components/testing_framework/Resources/Core/Acceptance/Fixtures/be_groups.xml',
-        'components/testing_framework/Resources/Core/Acceptance/Fixtures/sys_category.xml',
-        'components/testing_framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_extension.xml',
-        'components/testing_framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_repository.xml',
-    ];
-
-    /**
-     * Events to listen to
-     */
-    public static $events = [
-        Events::SUITE_BEFORE => 'bootstrapTypo3Environment',
-        Events::TEST_AFTER => 'cleanupTypo3Environment'
-    ];
-
-    /**
-     * Handle SUITE_BEFORE event.
-     *
-     * Create a full standalone TYPO3 instance within typo3temp/var/tests/acceptance,
-     * create a database and create database schema.
-     *
-     * @param SuiteEvent $suiteEvent
-     */
-    public function bootstrapTypo3Environment(SuiteEvent $suiteEvent)
-    {
-        $testbase = new Testbase();
-        $testbase->enableDisplayErrors();
-        $testbase->defineBaseConstants();
-        $testbase->defineOriginalRootPath();
-        $testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/tests/acceptance');
-        $testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/transient');
-
-        $instancePath = ORIGINAL_ROOT . 'typo3temp/var/tests/acceptance';
-
-        $testbase->defineTypo3ModeBe();
-        $testbase->setTypo3TestingContext();
-        $testbase->removeOldInstanceIfExists($instancePath);
-        // Basic instance directory structure
-        $testbase->createDirectory($instancePath . '/fileadmin');
-        $testbase->createDirectory($instancePath . '/typo3temp/var/transient');
-        $testbase->createDirectory($instancePath . '/typo3temp/assets');
-        $testbase->createDirectory($instancePath . '/typo3conf/ext');
-        $testbase->createDirectory($instancePath . '/uploads');
-        // Additionally requested directories
-        foreach ($this->additionalFoldersToCreate as $directory) {
-            $testbase->createDirectory($instancePath . '/' . $directory);
-        }
-        $testbase->createLastRunTextfile($instancePath);
-        $testbase->setUpInstanceCoreLinks($instancePath);
-        // ext:styleguide is always loaded
-        $testExtensionsToLoad = array_merge(
-            [ 'typo3conf/ext/styleguide' ],
-            $this->testExtensionsToLoad
-        );
-        $testbase->linkTestExtensionsToInstance($instancePath, $testExtensionsToLoad);
-        $testbase->linkPathsInTestInstance($instancePath, $this->pathsToLinkInTestInstance);
-        $localConfiguration['DB'] = $testbase->getOriginalDatabaseSettingsFromEnvironmentOrLocalConfiguration();
-        $originalDatabaseName = $localConfiguration['DB']['Connections']['Default']['dbname'];
-        // Append the unique identifier to the base database name to end up with a single database per test case
-        $localConfiguration['DB']['Connections']['Default']['dbname'] = $originalDatabaseName . '_at';
-        $testbase->testDatabaseNameIsNotTooLong($originalDatabaseName, $localConfiguration);
-        // Set some hard coded base settings for the instance. Those could be overruled by
-        // $this->configurationToUseInTestInstance if needed again.
-        $localConfiguration['BE']['debug'] = true;
-        $localConfiguration['BE']['lockHashKeyWords'] = '';
-        $localConfiguration['BE']['installToolPassword'] = $this->getInstallToolPassword();
-        $localConfiguration['BE']['loginSecurityLevel'] = 'rsa';
-        $localConfiguration['SYS']['isInitialInstallationInProgress'] = false;
-        $localConfiguration['SYS']['isInitialDatabaseImportDone'] = true;
-        $localConfiguration['SYS']['displayErrors'] = false;
-        $localConfiguration['SYS']['debugExceptionHandler'] = '';
-        $localConfiguration['SYS']['trustedHostsPattern'] = 'localhost:8000';
-        $localConfiguration['SYS']['encryptionKey'] = 'iAmInvalid';
-        // @todo: This sql_mode should be enabled as soon as styleguide and dataHandler can cope with it
-        //$localConfiguration['SYS']['setDBinit'] = 'SET SESSION sql_mode = \'STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY\';';
-        $localConfiguration['SYS']['caching']['cacheConfigurations']['extbase_object']['backend'] = NullBackend::class;
-        $testbase->setUpLocalConfiguration($instancePath, $localConfiguration, $this->configurationToUseInTestInstance);
-        $defaultCoreExtensionsToLoad = [
-            'core',
-            'beuser',
-            'extbase',
-            'fluid',
-            'filelist',
-            'extensionmanager',
-            'lang',
-            'setup',
-            'rsaauth',
-            'saltedpasswords',
-            'backend',
-            'about',
-            'belog',
-            'install',
-            't3skin',
-            'frontend',
-            'recordlist',
-            'reports',
-            'sv',
-            'scheduler',
-            'tstemplate',
-        ];
-        $testbase->setUpPackageStates($instancePath, $defaultCoreExtensionsToLoad, $this->coreExtensionsToLoad, $testExtensionsToLoad);
-        $testbase->setUpBasicTypo3Bootstrap($instancePath);
-        $testbase->setUpTestDatabase($localConfiguration['DB']['Connections']['Default']['dbname'], $originalDatabaseName);
-        $testbase->loadExtensionTables();
-        $testbase->createDatabaseStructure();
-
-        // Unset a closure or phpunit kicks in with a 'serialization of \Closure is not allowed'
-        // Alternative solution:
-        // unset($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['cliKeys']['extbase']);
-        $suite = $suiteEvent->getSuite();
-        $suite->setBackupGlobals(false);
-
-        foreach ($this->xmlDatabaseFixtures as $fixture) {
-            $testbase->importXmlDatabaseFixture(ORIGINAL_ROOT . $fixture);
-        }
-
-        // styleguide generator uses DataHandler for some parts. DataHandler needs an initialized BE user
-        // with admin right and the live workspace.
-        Bootstrap::getInstance()->initializeBackendUser();
-        $GLOBALS['BE_USER']->user['admin'] = 1;
-        $GLOBALS['BE_USER']->user['uid'] = 1;
-        $GLOBALS['BE_USER']->workspace = 0;
-        Bootstrap::getInstance()->initializeLanguageObject();
-
-        $styleguideGenerator = new Generator();
-        $styleguideGenerator->create();
-
-        // @todo: Find out why that is needed to execute the first test successfully
-        $this->cleanupTypo3Environment();
-    }
-
-    /**
-     * Method executed after each test
-     */
-    public function cleanupTypo3Environment()
-    {
-        // Reset uc db field of be_user "admin" to null to reduce
-        // possible side effects between single tests.
-        GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getConnectionForTable('be_users')
-            ->update('be_users', ['uc' => null], ['uid' => 1]);
-    }
-
-    /**
-     * Set install tool password. This is either a salted password
-     * of a given typo3InstallToolPassword environment variable, or
-     * a hardcoded value that does not allow login.
-     *
-     * @return string
-     */
-    protected function getInstallToolPassword(): string
-    {
-        $password = getenv('typo3InstallToolPassword');
-        if (!empty($password)) {
-            $saltFactory = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance(null, 'BE');
-            return $saltFactory->getHashedPassword($password);
-        } else {
-            return '$P$notnotnotnotnotnot.validvalidva';
-        }
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Acceptance/Step/Backend/Admin.php b/components/testing_framework/Classes/Core/Acceptance/Step/Backend/Admin.php
deleted file mode 100644 (file)
index 4047eac..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Acceptance\Step\Backend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * A backend user with admin access
- */
-class Admin extends \AcceptanceTester
-{
-    /**
-     * The session cookie that is used if the session is injected.
-     * This session must exist in the database fixture to get a logged in state.
-     *
-     * @var string
-     */
-    protected $sessionCookie = '886526ce72b86870739cc41991144ec1';
-}
diff --git a/components/testing_framework/Classes/Core/Acceptance/Step/Backend/Editor.php b/components/testing_framework/Classes/Core/Acceptance/Step/Backend/Editor.php
deleted file mode 100644 (file)
index ce8f64d..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Acceptance\Step\Backend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * A backend editor
- */
-class Editor extends \AcceptanceTester
-{
-    /**
-     * The session cookie that is used if the session is injected.
-     * This session must exist in the database fixture to get a logged in state.
-     *
-     * @var string
-     */
-    protected $sessionCookie = 'ff83dfd81e20b34c27d3e97771a4525a';
-}
diff --git a/components/testing_framework/Classes/Core/Acceptance/Support/Helper/ModalDialog.php b/components/testing_framework/Classes/Core/Acceptance/Support/Helper/ModalDialog.php
deleted file mode 100644 (file)
index 087fd9a..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Acceptance\Support\Helper;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use AcceptanceTester;
-
-/**
- * Helper to interact with modal dialogs that appear for example when
- * you delete a record or have to confirm something.
- *
- *  --------------------------------
- * | Would you like to continue?    |
- * |                                |
- * |            [no] [maybe] [yeah] |
- *  --------------------------------
- */
-class ModalDialog
-{
-    /**
-     * Selector for a visible modal window
-     *
-     * @var string
-     */
-    public static $openedModalSelector = '.modal.in';
-
-    /**
-     * Selector for the container in the modal where the buttons are located
-     *
-     * @var string
-     */
-    public static $openedModalButtonContainerSelector = '.modal.in .modal-footer';
-
-    /**
-     * @var AcceptanceTester
-     */
-    protected $tester;
-
-    /**
-     * @param AcceptanceTester $I
-     */
-    public function __construct(\AcceptanceTester $I)
-    {
-        $this->tester = $I;
-    }
-
-    /**
-     * Perform a click on a link or a button, given by a locator.
-     *
-     * @param string $buttonLinkLocator the button title
-     * @see \Codeception\Module\WebDriver::click()
-     */
-    public function clickButtonInDialog(string $buttonLinkLocator)
-    {
-        $I = $this->tester;
-        $this->canSeeDialog();
-        $I->click($buttonLinkLocator, self::$openedModalButtonContainerSelector);
-        $I->waitForElementNotVisible(self::$openedModalSelector);
-    }
-
-    /**
-     * Check if modal dialog is visible in top frame
-     */
-    public function canSeeDialog()
-    {
-        $I = $this->tester;
-        $I->switchToIFrame();
-        $I->waitForElement(self::$openedModalSelector);
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Acceptance/Support/Helper/Topbar.php b/components/testing_framework/Classes/Core/Acceptance/Support/Helper/Topbar.php
deleted file mode 100644 (file)
index 81bb26e..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Acceptance\Support\Helper;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Helper to interact with the Topbar
- */
-class Topbar
-{
-    /**
-     * Selector for the topbar container
-     *
-     * @var string
-     */
-    public static $containerSelector = '.t3js-scaffold-toolbar';
-
-    /**
-     * Selector for the dropdown container
-     *
-     * @var string
-     */
-    public static $dropdownListSelector = '.dropdown-menu';
-
-    /**
-     * Selector for the dropdown toggle
-     *
-     * @var string
-     */
-    public static $dropdownToggleSelector = '.dropdown-toggle';
-}
diff --git a/components/testing_framework/Classes/Core/Acceptance/Support/Page/PageTree.php b/components/testing_framework/Classes/Core/Acceptance/Support/Page/PageTree.php
deleted file mode 100644 (file)
index 159c508..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Acceptance\Support\Page;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use AcceptanceTester;
-use Facebook\WebDriver\Remote\RemoteWebElement;
-use Facebook\WebDriver\WebDriverBy;
-
-/**
- * Helper class to interact with the page tree
- */
-class PageTree
-{
-    // Selectors
-    public static $pageTreeFrameSelector = '#typo3-pagetree';
-    public static $pageTreeSelector = '#typo3-pagetree-treeContainer';
-    public static $treeItemSelector = '.x-tree-node-ct > .x-tree-node';
-    public static $treeItemAnchorSelector = '.x-tree-node-anchor';
-
-    /**
-     * @var AcceptanceTester
-     */
-    protected $tester;
-
-    /**
-     * @param AcceptanceTester $I
-     */
-    public function __construct(\AcceptanceTester $I)
-    {
-        $this->tester = $I;
-    }
-
-    /**
-     * Open the given hierarchical path in the pagetree and click the last page.
-     *
-     * Example to open "styleuide -> elements basic" page:
-     * [
-     *    'styleguide TCA demo',
-     *    'elements basic',
-     * ]
-     *
-     * @param string[] $path
-     */
-    public function openPath(array $path)
-    {
-        $context = $this->getPageTreeElement();
-        foreach ($path as $pageName) {
-            $context = $this->ensureTreeNodeIsOpen($pageName, $context);
-        }
-        $context->findElement(\WebDriverBy::cssSelector(self::$treeItemAnchorSelector))->click();
-    }
-
-    /**
-     * Check if the pagetree is visible end return the web element object
-     *
-     * @return RemoteWebElement
-     */
-    public function getPageTreeElement()
-    {
-        $I = $this->tester;
-        $I->switchToIFrame();
-        return $I->executeInSelenium(function (\Facebook\WebDriver\Remote\RemoteWebDriver $webdriver) {
-            return $webdriver->findElement(\WebDriverBy::cssSelector(self::$pageTreeSelector));
-        });
-    }
-
-    /**
-     * Search for an element with the given link text in the provided context.
-     *
-     * @param string $nodeText
-     * @param RemoteWebElement $context
-     * @return RemoteWebElement
-     */
-    protected function ensureTreeNodeIsOpen(string $nodeText, RemoteWebElement $context)
-    {
-        $I = $this->tester;
-        $I->see($nodeText, self::$treeItemSelector);
-
-        /** @var RemoteWebElement $context */
-        $context = $I->executeInSelenium(function () use ($nodeText, $context
-        ) {
-            return $context->findElement(\WebDriverBy::linkText($nodeText))->findElement(
-                WebDriverBy::xpath('ancestor::li[@class="x-tree-node"][1]')
-            );
-        });
-
-        try {
-            $context->findElement(\WebDriverBy::cssSelector('.x-tree-elbow-end-plus'))->click();
-        } catch (\Facebook\WebDriver\Exception\NoSuchElementException $e) {
-            // element not found so it may be already opened...
-        }
-
-        return $context;
-    }
-}
diff --git a/components/testing_framework/Classes/Core/AccessibleObjectInterface.php b/components/testing_framework/Classes/Core/AccessibleObjectInterface.php
deleted file mode 100644 (file)
index 02e4e45..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * This interface defines the methods provided by TYPO3\TestingFramework\Core\TestCase::getAccessibleMock.::
- */
-interface AccessibleObjectInterface
-{
-    /**
-     * Calls the method $method using call_user_func* and returns its return value.
-     *
-     * @param string $methodName name of method to call, must not be empty
-     *
-     * @return mixed the return value from the method $methodName
-     */
-    public function _call($methodName);
-
-    /**
-     * Calls the method $method without using call_user_func* and returns its return value.
-     *
-     * @param string $methodName name of method to call, must not be empty
-     * @param mixed &$arg1 first argument given to method $methodName
-     * @param mixed &$arg2 second argument given to method $methodName
-     * @param mixed &$arg3 third argument given to method $methodName
-     * @param mixed &$arg4 fourth argument given to method $methodName
-     * @param mixed &$arg5 fifth argument given to method $methodName
-     * @param mixed &$arg6 sixth argument given to method $methodName
-     * @param mixed &$arg7 seventh argument given to method $methodName
-     * @param mixed &$arg8 eighth argument given to method $methodName
-     * @param mixed &$arg9 ninth argument given to method $methodName
-     *
-     * @return mixed the return value from the method $methodName
-     */
-    public function _callRef(
-        $methodName, &$arg1 = null, &$arg2 = null, &$arg3 = null, &$arg4 = null, &$arg5= null, &$arg6 = null, &$arg7 = null,
-        &$arg8 = null, &$arg9 = null
-    );
-
-    /**
-     * Sets the value of a property.
-     *
-     * @param string $propertyName name of property to set value for, must not be empty
-     * @param mixed $value the new value for the property defined in $propertyName
-     */
-    public function _set($propertyName, $value);
-
-    /**
-     * Sets the value of a property by reference.
-     *
-     * @param string $propertyName name of property to set value for, must not be empty
-     * @param mixed &$value the new value for the property defined in $propertyName
-     */
-    public function _setRef($propertyName, &$value);
-
-    /**
-     * Sets the value of a static property.
-     *
-     * @param string $propertyName name of property to set value for, must not be empty
-     * @param mixed $value the new value for the property defined in $propertyName
-     */
-    public function _setStatic($propertyName, $value);
-
-    /**
-     * Gets the value of the given property.
-     *
-     * @param string $propertyName name of property to return value of, must not be empty
-     *
-     * @return mixed the value of the property $propertyName
-     */
-    public function _get($propertyName);
-
-    /**
-     * Gets the value of the given static property.
-     *
-     * @param string $propertyName name of property to return value of, must not be empty
-     *
-     * @return mixed the value of the static property $propertyName
-     */
-    public function _getStatic($propertyName);
-}
diff --git a/components/testing_framework/Classes/Core/BaseTestCase.php b/components/testing_framework/Classes/Core/BaseTestCase.php
deleted file mode 100644 (file)
index f91fdcf..0000000
+++ /dev/null
@@ -1,296 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * The mother of all test cases.
- *
- * Don't sub class this test case but rather choose a more specialized base test case,
- * such as UnitTestCase or FunctionalTestCase
- */
-abstract class BaseTestCase extends \PHPUnit_Framework_TestCase
-{
-    /**
-     * Whether global variables should be backed up
-     *
-     * @var bool
-     */
-    protected $backupGlobals = true;
-
-    /**
-     * Whether static attributes should be backed up
-     *
-     * @var bool
-     */
-    protected $backupStaticAttributes = false;
-
-    /**
-     * Creates a mock object which allows for calling protected methods and access of protected properties.
-     *
-     * @param string $originalClassName name of class to create the mock object of, must not be empty
-     * @param string[]|null $methods name of the methods to mock, null for "mock no methods"
-     * @param array $arguments arguments to pass to constructor
-     * @param string $mockClassName the class name to use for the mock class
-     * @param bool $callOriginalConstructor whether to call the constructor
-     * @param bool $callOriginalClone whether to call the __clone method
-     * @param bool $callAutoload whether to call any autoload function
-     *
-     * @return \PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface
-     *         a mock of $originalClassName with access methods added
-     *
-     * @throws \InvalidArgumentException
-     */
-    protected function getAccessibleMock(
-        $originalClassName, $methods = [], array $arguments = [], $mockClassName = '',
-        $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true
-    ) {
-        if ($originalClassName === '') {
-            throw new \InvalidArgumentException('$originalClassName must not be empty.', 1334701880);
-        }
-
-        $mockBuilder = $this->getMockBuilder($this->buildAccessibleProxy($originalClassName))
-            ->setMethods($methods)
-            ->setConstructorArgs($arguments)
-            ->setMockClassName($mockClassName);
-
-        if (!$callOriginalConstructor) {
-            $mockBuilder->disableOriginalConstructor();
-        }
-
-        if (!$callOriginalClone) {
-            $mockBuilder->disableOriginalClone();
-        }
-
-        if (!$callAutoload) {
-            $mockBuilder->disableAutoload();
-        }
-
-        return $mockBuilder->getMock();
-    }
-
-    /**
-     * Returns a mock object which allows for calling protected methods and access
-     * of protected properties. Concrete methods to mock can be specified with
-     * the last parameter
-     *
-     * @param string $originalClassName Full qualified name of the original class
-     * @param array $arguments
-     * @param string $mockClassName
-     * @param bool $callOriginalConstructor
-     * @param bool $callOriginalClone
-     * @param bool $callAutoload
-     * @param array $mockedMethods
-     *
-     * @throws \InvalidArgumentException
-     *
-     * @return \PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface
-     */
-    protected function getAccessibleMockForAbstractClass(
-        $originalClassName, array $arguments = [], $mockClassName = '',
-        $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = []
-    ) {
-        if ($originalClassName === '') {
-            throw new \InvalidArgumentException('$originalClassName must not be empty.', 1384268260);
-        }
-
-        return $this->getMockForAbstractClass(
-            $this->buildAccessibleProxy($originalClassName),
-            $arguments,
-            $mockClassName,
-            $callOriginalConstructor,
-            $callOriginalClone,
-            $callAutoload,
-            $mockedMethods
-        );
-    }
-
-    /**
-     * Creates a proxy class of the specified class which allows
-     * for calling even protected methods and access of protected properties.
-     *
-     * @param string $className Name of class to make available, must not be empty
-     * @return string Fully qualified name of the built class, will not be empty
-     */
-    protected function buildAccessibleProxy($className)
-    {
-        $accessibleClassName = $this->getUniqueId('Tx_Phpunit_AccessibleProxy');
-        $class = new \ReflectionClass($className);
-        $abstractModifier = $class->isAbstract() ? 'abstract ' : '';
-
-        eval(
-            $abstractModifier . 'class ' . $accessibleClassName .
-                ' extends ' . $className . ' implements ' . \TYPO3\TestingFramework\Core\AccessibleObjectInterface::class . ' {' .
-                    'public function _call($methodName) {' .
-                        'if ($methodName === \'\') {' .
-                            'throw new \InvalidArgumentException(\'$methodName must not be empty.\', 1334663993);' .
-                        '}' .
-                        '$args = func_get_args();' .
-                        'return call_user_func_array(array($this, $methodName), array_slice($args, 1));' .
-                    '}' .
-                    'public function _callRef(' .
-                        '$methodName, &$arg1 = NULL, &$arg2 = NULL, &$arg3 = NULL, &$arg4 = NULL, &$arg5= NULL, &$arg6 = NULL, ' .
-                        '&$arg7 = NULL, &$arg8 = NULL, &$arg9 = NULL' .
-                    ') {' .
-                        'if ($methodName === \'\') {' .
-                            'throw new \InvalidArgumentException(\'$methodName must not be empty.\', 1334664210);' .
-                        '}' .
-                        'switch (func_num_args()) {' .
-                            'case 0:' .
-                                'throw new RuntimeException(\'The case of 0 arguments is not supposed to happen.\', 1334703124);' .
-                                'break;' .
-                            'case 1:' .
-                                '$returnValue = $this->$methodName();' .
-                                'break;' .
-                            'case 2:' .
-                                '$returnValue = $this->$methodName($arg1);' .
-                                'break;' .
-                            'case 3:' .
-                                '$returnValue = $this->$methodName($arg1, $arg2);' .
-                                'break;' .
-                            'case 4:' .
-                                '$returnValue = $this->$methodName($arg1, $arg2, $arg3);' .
-                                'break;' .
-                            'case 5:' .
-                                '$returnValue = $this->$methodName($arg1, $arg2, $arg3, $arg4);' .
-                                'break;' .
-                            'case 6:' .
-                                '$returnValue = $this->$methodName($arg1, $arg2, $arg3, $arg4, $arg5);' .
-                                'break;' .
-                            'case 7:' .
-                                '$returnValue = $this->$methodName($arg1, $arg2, $arg3, $arg4, $arg5, $arg6);' .
-                                'break;' .
-                            'case 8:' .
-                                '$returnValue = $this->$methodName($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7);' .
-                                'break;' .
-                            'case 9:' .
-                                '$returnValue = $this->$methodName($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8);' .
-                                'break;' .
-                            'case 10:' .
-                                '$returnValue = $this->$methodName(' .
-                                    '$arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8, $arg9' .
-                                ');' .
-                                'break;' .
-                            'default:' .
-                                'throw new \InvalidArgumentException(' .
-                                    '\'_callRef currently only allows calls to methods with no more than 9 parameters.\', 1476049901' .
-                                ');' .
-                        '}' .
-                        'return $returnValue;' .
-                    '}' .
-                    'public function _set($propertyName, $value) {' .
-                        'if ($propertyName === \'\') {' .
-                            'throw new \InvalidArgumentException(\'$propertyName must not be empty.\', 1334664355);' .
-                        '}' .
-                        '$this->$propertyName = $value;' .
-                    '}' .
-                    'public function _setRef($propertyName, &$value) {' .
-                        'if ($propertyName === \'\') {' .
-                            'throw new \InvalidArgumentException(\'$propertyName must not be empty.\', 1334664545);' .
-                        '}' .
-                        '$this->$propertyName = $value;' .
-                    '}' .
-                    'public function _setStatic($propertyName, $value) {' .
-                        'if ($propertyName === \'\') {' .
-                            'throw new \InvalidArgumentException(\'$propertyName must not be empty.\', 1344242602);' .
-                        '}' .
-                        'self::$$propertyName = $value;' .
-                    '}' .
-                    'public function _get($propertyName) {' .
-                        'if ($propertyName === \'\') {' .
-                            'throw new \InvalidArgumentException(\'$propertyName must not be empty.\', 1334664967);' .
-                        '}' .
-                        'return $this->$propertyName;' .
-                    '}' .
-                    'public function _getStatic($propertyName) {' .
-                        'if ($propertyName === \'\') {' .
-                            'throw new \InvalidArgumentException(\'$propertyName must not be empty.\', 1344242603);' .
-                        '}' .
-                        'return self::$$propertyName;' .
-                    '}' .
-            '}'
-        );
-
-        return $accessibleClassName;
-    }
-
-    /**
-     * Helper function to call protected or private methods
-     *
-     * @param object $object The object to be invoked
-     * @param string $name the name of the method to call
-     * @param mixed $arguments
-     * @return mixed
-     */
-    protected function callInaccessibleMethod($object, $name, ...$arguments)
-    {
-        $reflectionObject = new \ReflectionObject($object);
-        $reflectionMethod = $reflectionObject->getMethod($name);
-        $reflectionMethod->setAccessible(true);
-        return $reflectionMethod->invokeArgs($object, $arguments);
-    }
-
-    /**
-     * Injects $dependency into property $name of $target
-     *
-     * This is a convenience method for setting a protected or private property in
-     * a test subject for the purpose of injecting a dependency.
-     *
-     * @param object $target The instance which needs the dependency
-     * @param string $name Name of the property to be injected
-     * @param mixed $dependency The dependency to inject – usually an object but can also be any other type
-     * @throws \RuntimeException
-     * @throws \InvalidArgumentException
-     */
-    protected function inject($target, $name, $dependency)
-    {
-        if (!is_object($target)) {
-            throw new \InvalidArgumentException('Wrong type for argument $target, must be object.', 1476107338);
-        }
-
-        $objectReflection = new \ReflectionObject($target);
-        $methodNamePart = strtoupper($name[0]) . substr($name, 1);
-        if ($objectReflection->hasMethod('set' . $methodNamePart)) {
-            $methodName = 'set' . $methodNamePart;
-            $target->$methodName($dependency);
-        } elseif ($objectReflection->hasMethod('inject' . $methodNamePart)) {
-            $methodName = 'inject' . $methodNamePart;
-            $target->$methodName($dependency);
-        } elseif ($objectReflection->hasProperty($name)) {
-            $property = $objectReflection->getProperty($name);
-            $property->setAccessible(true);
-            $property->setValue($target, $dependency);
-        } else {
-            throw new \RuntimeException(
-                'Could not inject ' . $name . ' into object of type ' . get_class($target),
-                1476107339
-            );
-        }
-    }
-
-    /**
-     * Create and return a unique id optionally prepended by a given string
-     *
-     * This function is used because on windows and in cygwin environments uniqid() has a resolution of one second which
-     * results in identical ids if simply uniqid('Foo'); is called.
-     *
-     * @param string $prefix
-     * @return string
-     */
-    protected function getUniqueId($prefix = '')
-    {
-        $uniqueId = uniqid(mt_rand(), true);
-        return $prefix . str_replace('.', '', $uniqueId);
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Exception.php b/components/testing_framework/Classes/Core/Exception.php
deleted file mode 100644 (file)
index 8edc0c7..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * An exception - Thrown in abstract test cases to mark
- * a test configuration or setup error.
- */
-class Exception extends \Exception
-{
-}
diff --git a/components/testing_framework/Classes/Core/FileStreamWrapper.php b/components/testing_framework/Classes/Core/FileStreamWrapper.php
deleted file mode 100644 (file)
index 765b122..0000000
+++ /dev/null
@@ -1,603 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Stream wrapper for the file:// protocol
- *
- * Implementation details:
- * Due to the nature of PHP, it is not possible to switch to the default handler
- * other then restoring the default handler for file:// and registering it again
- * around each call.
- * It is important that the default handler is restored to allow autoloading (including)
- * of files during the test run.
- * For each method allowed to pass paths, the passed path is checked against the
- * the list of paths to overlay and rewritten if needed.
- *
- * = Usage =
- * <code title="Add use statements">
- * use org\bovigo\vfs\vfsStream;
- * use org\bovigo\vfs\visitor\vfsStreamStructureVisitor;
- * </code>
- *
- * <code title="Usage in test">
- * $root = \org\bovigo\vfs\vfsStream::setup('root');
- * $subfolder = \org\bovigo\vfs\vfsStream::newDirectory('fileadmin');
- * $root->addChild($subfolder);
- * // Load fixture files and folders from disk
- * \org\bovigo\vfs\vfsStream::copyFromFileSystem(__DIR__ . '/Fixture/Files', $subfolder, 1024*1024);
- * FileStreamWrapper::init(PATH_site);
- * FileStreamWrapper::registerOverlayPath('fileadmin', 'vfs://root/fileadmin');
- *
- * // Use file functions as usual
- * mkdir(PATH_site . 'fileadmin/test/');
- * $file = PATH_site . 'fileadmin/test/Foo.bar';
- * file_put_contents($file, 'Baz');
- * $content = file_get_contents($file);
- * $this->assertSame('Baz', $content);
- *
- * $this->assertEqual(**array(file system structure as array**), vfsStream::inspect(new vfsStreamStructureVisitor())->getStructure());
- *
- * FileStreamWrapper::destroy();
- * </code>
- *
- * @see http://www.php.net/manual/en/class.streamwrapper.php
- */
-class FileStreamWrapper
-{
-    /**
-     * @var resource
-     */
-    protected $dirHandle = null;
-
-    /**
-     * @var resource
-     */
-    protected $fileHandle = null;
-
-    /**
-     * Switch whether class has already been registered as stream wrapper or not
-     *
-     * @type bool
-     */
-    protected static $registered = false;
-
-    /**
-     * Array of paths to overlay
-     *
-     * @var array
-     */
-    protected static $overlayPaths = [];
-
-    /**
-     * The first part of each (absolute) path that shall be ignored
-     *
-     * @var string
-     */
-    protected static $rootPath = '';
-
-    /**
-     * Initialize the stream wrapper with a root path and register itself
-     *
-     * @param $rootPath
-     */
-    public static function init($rootPath)
-    {
-        self::$rootPath = rtrim(str_replace('\\', '/', $rootPath), '/') . '/';
-        self::register();
-    }
-
-    /**
-     * Unregister the stream wrapper and reset all static members to their default values
-     */
-    public static function destroy()
-    {
-        self::$overlayPaths = [];
-        self::$rootPath = '';
-        if (self::$registered) {
-            self::restore();
-        }
-    }
-
-    /**
-     * Register a path relative to the root path (set in init) to be overlaid
-     *
-     * @param string $overlay Relative path to the root folder
-     * @param string $replace The path that should replace the overlay path
-     * @param bool $createFolder TRUE of the folder should be created (mkdir)
-     */
-    public static function registerOverlayPath($overlay, $replace, $createFolder = true)
-    {
-        $overlay = trim(str_replace('\\', '/', $overlay), '/') . '/';
-        $replace = rtrim(str_replace('\\', '/', $replace), '/') . '/';
-        self::$overlayPaths[$overlay] = $replace;
-        if ($createFolder) {
-            mkdir($replace);
-        }
-    }
-
-    /**
-     * Checks and overlays a path
-     *
-     * @param string $path The path to check
-     * @return string The potentially overlaid path
-     */
-    protected static function overlayPath($path)
-    {
-        $path = str_replace('\\', '/', $path);
-        $hasOverlay = false;
-        if (strpos($path, self::$rootPath) !== 0) {
-            // Path is not below root path, ignore it
-            return $path;
-        }
-
-        $newPath = ltrim(substr($path, strlen(self::$rootPath)), '/');
-        foreach (self::$overlayPaths as $overlay => $replace) {
-            if (strpos($newPath, $overlay) === 0) {
-                $newPath = $replace . substr($newPath, strlen($overlay));
-                $hasOverlay = true;
-                break;
-            }
-        }
-        return $hasOverlay ? $newPath : $path;
-    }
-
-    /**
-     * Method to register the stream wrapper
-     *
-     * If the stream is already registered the method returns silently. If there
-     * is already another stream wrapper registered for the scheme used by
-     * file:// scheme a \BadFunctionCallException will be thrown.
-     *
-     * @throws \BadFunctionCallException
-     */
-    protected static function register()
-    {
-        if (self::$registered) {
-            return;
-        }
-
-        if (@stream_wrapper_unregister('file') === false) {
-            throw new \BadFunctionCallException('Cannot unregister file:// stream wrapper.', 1396340331);
-        }
-        if (@stream_wrapper_register('file', __CLASS__) === false) {
-            throw new \BadFunctionCallException('A handler has already been registered for the file:// scheme.', 1396340332);
-        }
-
-        self::$registered = true;
-    }
-
-    /**
-     * Restore the file handler
-     */
-    protected static function restore()
-    {
-        if (!self::$registered) {
-            return;
-        }
-        if (@stream_wrapper_restore('file') === false) {
-            throw new \BadFunctionCallException('Cannot restore the default file:// stream handler.', 1396340333);
-        }
-        self::$registered = false;
-    }
-
-    /*
-     * The following list of functions is implemented as of
-     * @see http://www.php.net/manual/en/streamwrapper.dir-closedir.php
-     */
-
-    /**
-     * Close the directory
-     *
-     * @return bool
-     */
-    public function dir_closedir()
-    {
-        if ($this->dirHandle === null) {
-            return false;
-        } else {
-            self::restore();
-            closedir($this->dirHandle);
-            self::register();
-            $this->dirHandle = null;
-            return true;
-        }
-    }
-
-    /**
-     * Opens a directory for reading
-     *
-     * @param string $path
-     * @param int $options
-     * @return bool
-     */
-    public function dir_opendir($path, $options = 0)
-    {
-        if ($this->dirHandle !== null) {
-            return false;
-        }
-        self::restore();
-        $path = self::overlayPath($path);
-        $this->dirHandle = opendir($path);
-        self::register();
-        return $this->dirHandle !== false;
-    }
-
-    /**
-     * Read a single filename of a directory
-     *
-     * @return string|bool
-     */
-    public function dir_readdir()
-    {
-        if ($this->dirHandle === null) {
-            return false;
-        }
-        self::restore();
-        $success = readdir($this->dirHandle);
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Reset directory name pointer
-     *
-     * @return bool
-     */
-    public function dir_rewinddir()
-    {
-        if ($this->dirHandle === null) {
-            return false;
-        }
-        self::restore();
-        rewinddir($this->dirHandle);
-        self::register();
-        return true;
-    }
-
-    /**
-     * Create a directory
-     *
-     * @param string $path
-     * @param int $mode
-     * @param int $options
-     * @return bool
-     */
-    public function mkdir($path, $mode, $options = 0)
-    {
-        self::restore();
-        $path = self::overlayPath($path);
-        $success = mkdir($path, $mode, (bool)($options & STREAM_MKDIR_RECURSIVE));
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Rename a file
-     *
-     * @param string $pathFrom
-     * @param string $pathTo
-     * @return bool
-     */
-    public function rename($pathFrom, $pathTo)
-    {
-        self::restore();
-        $pathFrom = self::overlayPath($pathFrom);
-        $pathTo = self::overlayPath($pathTo);
-        $success = rename($pathFrom, $pathTo);
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Remove a directory
-     *
-     * @param string $path
-     * @return bool
-     */
-    public function rmdir($path)
-    {
-        self::restore();
-        $path = self::overlayPath($path);
-        $success = rmdir($path);
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Retrieve the underlying resource
-     *
-     * @param int $castAs Can be STREAM_CAST_FOR_SELECT when stream_select()
-     * is calling stream_cast() or STREAM_CAST_AS_STREAM when stream_cast()
-     * is called for other uses.
-     * @return resource|bool
-     */
-    public function stream_cast($castAs)
-    {
-        if ($this->fileHandle !== null && $castAs & STREAM_CAST_AS_STREAM) {
-            return $this->fileHandle;
-        } else {
-            return false;
-        }
-    }
-
-    /**
-     * Close a file
-     */
-    public function stream_close()
-    {
-        self::restore();
-        if ($this->fileHandle !== null) {
-            fclose($this->fileHandle);
-            $this->fileHandle = null;
-        }
-        self::register();
-    }
-
-    /**
-     * Test for end-of-file on a file pointer
-     *
-     * @return bool
-     */
-    public function stream_eof()
-    {
-        if ($this->fileHandle === null) {
-            return false;
-        }
-        self::restore();
-        $success = feof($this->fileHandle);
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Flush the output
-     *
-     * @return bool
-     */
-    public function stream_flush()
-    {
-        if ($this->fileHandle === null) {
-            return false;
-        }
-        self::restore();
-        $success = fflush($this->fileHandle);
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Advisory file locking
-     *
-     * @param int $operation
-     * @return bool
-     */
-    public function stream_lock($operation)
-    {
-        if ($this->fileHandle === null) {
-            return false;
-        }
-        self::restore();
-        $success = flock($this->fileHandle, $operation);
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Change file options
-     *
-     * @param string $path
-     * @param int $options
-     * @param mixed $value
-     * @return bool
-     */
-    public function stream_metadata($path, $options, $value)
-    {
-        self::restore();
-        $path = self::overlayPath($path);
-        switch ($options) {
-            case STREAM_META_TOUCH:
-                $success = touch($path, $value[0], $value[1]);
-                break;
-            case STREAM_META_OWNER_NAME:
-                // Fall through
-            case STREAM_META_OWNER:
-                $success = chown($path, $value);
-                break;
-            case STREAM_META_GROUP_NAME:
-                // Fall through
-            case STREAM_META_GROUP:
-                $success = chgrp($path, $value);
-                break;
-            case STREAM_META_ACCESS:
-                $success = chmod($path, $value);
-                break;
-            default:
-                $success = false;
-        }
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Open a file
-     *
-     * @param string $path
-     * @param string $mode
-     * @param int $options
-     * @param string &$opened_path
-     * @return bool
-     */
-    public function stream_open($path, $mode, $options, &$opened_path)
-    {
-        if ($this->fileHandle !== null) {
-            return false;
-        }
-        self::restore();
-        $path = self::overlayPath($path);
-        $this->fileHandle = fopen($path, $mode, (bool)($options & STREAM_USE_PATH));
-        self::register();
-        return $this->fileHandle !== false;
-    }
-
-    /**
-     * Read from a file
-     *
-     * @param int $length
-     * @return string
-     */
-    public function stream_read($length)
-    {
-        if ($this->fileHandle === null) {
-            return false;
-        }
-        self::restore();
-        $content = fread($this->fileHandle, $length);
-        self::register();
-        return $content;
-    }
-
-    /**
-     * Seek to specific location in a stream
-     *
-     * @param int $offset
-     * @param int $whence = SEEK_SET
-     * @return bool
-     */
-    public function stream_seek($offset, $whence = SEEK_SET)
-    {
-        if ($this->fileHandle === null) {
-            return false;
-        }
-        self::restore();
-        $success = fseek($this->fileHandle, $offset, $whence);
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Change stream options (not implemented)
-     *
-     * @param int $option
-     * @param int $arg1
-     * @param int $arg2
-     * @return bool
-     */
-    public function stream_set_option($option, $arg1, $arg2)
-    {
-        return false;
-    }
-
-    /**
-     * Retrieve information about a file resource
-     *
-     * @return array
-     */
-    public function stream_stat()
-    {
-        if ($this->fileHandle === null) {
-            return false;
-        }
-        self::restore();
-        $stats = fstat($this->fileHandle);
-        self::register();
-        return $stats;
-    }
-
-    /**
-     * Retrieve the current position of a stream
-     *
-     * @return int
-     */
-    public function stream_tell()
-    {
-        if ($this->fileHandle === null) {
-            return false;
-        }
-        self::restore();
-        $position = ftell($this->fileHandle);
-        self::register();
-        return $position;
-    }
-
-    /**
-     * Truncates a file to the given size
-     *
-     * @param int $size Truncate to this size
-     * @return bool
-     */
-    public function stream_truncate($size)
-    {
-        if ($this->fileHandle === null) {
-            return false;
-        }
-        self::restore();
-        $success = ftruncate($this->fileHandle, $size);
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Write to stream
-     *
-     * @param string $data
-     * @return int
-     */
-    public function stream_write($data)
-    {
-        if ($this->fileHandle === null) {
-            return false;
-        }
-        self::restore();
-        $length = fwrite($this->fileHandle, $data);
-        self::register();
-        return $length;
-    }
-
-    /**
-     * Unlink a file
-     *
-     * @param string $path
-     * @return bool
-     */
-    public function unlink($path)
-    {
-        self::restore();
-        $path = self::overlayPath($path);
-        $success = unlink($path);
-        self::register();
-        return $success;
-    }
-
-    /**
-     * Retrieve information about a file
-     *
-     * @param string $path
-     * @param int $flags
-     * @return array
-     */
-    public function url_stat($path, $flags)
-    {
-        self::restore();
-        $path = self::overlayPath($path);
-        if ($flags & STREAM_URL_STAT_LINK) {
-            $information = @lstat($path);
-        } else {
-            $information = @stat($path);
-        }
-        self::register();
-        return $information;
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/AbstractRecordConstraint.php b/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/AbstractRecordConstraint.php
deleted file mode 100644 (file)
index d27e5bc..0000000
+++ /dev/null
@@ -1,175 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Constraint\RequestSection;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseSection;
-
-/**
- * Model of frontend response
- */
-abstract class AbstractRecordConstraint extends \PHPUnit_Framework_Constraint
-{
-    /**
-     * @var array
-     */
-    protected $sectionFailures = [];
-
-    /**
-     * @var string
-     */
-    protected $table;
-
-    /**
-     * @var string
-     */
-    protected $field;
-
-    /**
-     * @var bool
-     */
-    protected $strict = false;
-
-    /**
-     * @var array
-     */
-    protected $values;
-
-    public function setTable($table)
-    {
-        $this->table = $table;
-        return $this;
-    }
-
-    public function setField($field)
-    {
-        $this->field = $field;
-        return $this;
-    }
-
-    public function setValues(...$values)
-    {
-        $this->values = $values;
-        return $this;
-    }
-
-    public function setStrict($strict)
-    {
-        $this->strict = (bool)$strict;
-        return $this;
-    }
-
-    /**
-     * Evaluates the constraint for parameter $other. Returns true if the
-     * constraint is met, false otherwise.
-     *
-     * @param array|ResponseSection|ResponseSection[] $other ResponseSections to evaluate
-     * @return bool
-     */
-    protected function matches($other)
-    {
-        if (is_array($other)) {
-            $success = null;
-            foreach ($other as $item) {
-                $currentSuccess = $this->matchesSection($item);
-                $success = ($success === null ? $currentSuccess : $success || $currentSuccess);
-            }
-            return !empty($success);
-        } else {
-            return $this->matchesSection($other);
-        }
-    }
-
-    /**
-     * @param ResponseSection $responseSection
-     * @return bool
-     */
-    abstract protected function matchesSection(ResponseSection $responseSection);
-
-    /**
-     * @param array $records
-     * @return array
-     */
-    protected function getNonMatchingValues(array $records)
-    {
-        $values = $this->values;
-
-        foreach ($records as $recordIdentifier => $recordData) {
-            if (strpos($recordIdentifier, $this->table . ':') !== 0) {
-                continue;
-            }
-
-            if (($foundValueIndex = array_search($recordData[$this->field], $values)) !== false) {
-                unset($values[$foundValueIndex]);
-            }
-        }
-
-        return $values;
-    }
-
-    /**
-     * @param array $records
-     * @return array
-     */
-    protected function getRemainingRecords(array $records)
-    {
-        $values = $this->values;
-
-        foreach ($records as $recordIdentifier => $recordData) {
-            if (strpos($recordIdentifier, $this->table . ':') !== 0) {
-                unset($records[$recordIdentifier]);
-                continue;
-            }
-
-            if (($foundValueIndex = array_search($recordData[$this->field], $values)) !== false) {
-                unset($values[$foundValueIndex]);
-                unset($records[$recordIdentifier]);
-            }
-        }
-
-        return $records;
-    }
-
-    /**
-     * Returns the description of the failure
-     *
-     * The beginning of failure messages is "Failed asserting that" in most
-     * cases. This method should return the second part of that sentence.
-     *
-     * @param mixed $other Evaluated value or object.
-     * @return string
-     */
-    protected function failureDescription($other)
-    {
-        return $this->toString();
-    }
-
-    /**
-     * Return additional failure description where needed
-     *
-     * The function can be overridden to provide additional failure
-     * information like a diff
-     *
-     * @param mixed $other Evaluated value or object.
-     * @return string
-     */
-    protected function additionalFailureDescription($other)
-    {
-        $failureDescription = '';
-        foreach ($this->sectionFailures as $sectionIdentifier => $sectionFailure) {
-            $failureDescription .= '* Section "' . $sectionIdentifier . '": ' . $sectionFailure . LF;
-        }
-        return $failureDescription;
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/AbstractStructureRecordConstraint.php b/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/AbstractStructureRecordConstraint.php
deleted file mode 100644 (file)
index 1ac20fa..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Constraint\RequestSection;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Model of frontend response
- */
-abstract class AbstractStructureRecordConstraint extends AbstractRecordConstraint
-{
-    /**
-     * @var string
-     */
-    protected $recordIdentifier;
-
-    /**
-     * @var string
-     */
-    protected $recordField;
-
-    public function setRecordIdentifier($recordIdentifier)
-    {
-        $this->recordIdentifier = $recordIdentifier;
-        return $this;
-    }
-
-    public function setRecordField($recordField)
-    {
-        $this->recordField = $recordField;
-        return $this;
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/DoesNotHaveRecordConstraint.php b/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/DoesNotHaveRecordConstraint.php
deleted file mode 100644 (file)
index fdcf4b5..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Constraint\RequestSection;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseSection;
-
-/**
- * Model of frontend response
- */
-class DoesNotHaveRecordConstraint extends AbstractRecordConstraint
-{
-    /**
-     * @param ResponseSection $responseSection
-     * @return bool
-     */
-    protected function matchesSection(ResponseSection $responseSection)
-    {
-        $records = $responseSection->getRecords();
-
-        if (empty($records) || !is_array($records)) {
-            $this->sectionFailures[$responseSection->getIdentifier()] = 'No records found.';
-            return false;
-        }
-
-        $nonMatchingValues = $this->getNonMatchingValues($records);
-        $matchingValues = array_diff($this->values, $nonMatchingValues);
-
-        if (!empty($matchingValues)) {
-            $this->sectionFailures[$responseSection->getIdentifier()] = 'Could not assert not having values for "' . $this->table . '.' . $this->field . '": ' . implode(', ', $matchingValues);
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Returns a string representation of the constraint.
-     *
-     * @return string
-     */
-    public function toString()
-    {
-        return 'response does not have record';
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/HasRecordConstraint.php b/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/HasRecordConstraint.php
deleted file mode 100644 (file)
index 7c8c494..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Constraint\RequestSection;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseSection;
-
-/**
- * Model of frontend response
- */
-class HasRecordConstraint extends AbstractRecordConstraint
-{
-    /**
-     * @param ResponseSection $responseSection
-     * @return bool
-     */
-    protected function matchesSection(ResponseSection $responseSection)
-    {
-        $records = $responseSection->getRecords();
-
-        if (empty($records) || !is_array($records)) {
-            $this->sectionFailures[$responseSection->getIdentifier()] = 'No records found.';
-            return false;
-        }
-
-        $nonMatchingValues = $this->getNonMatchingValues($records);
-
-        if (!empty($nonMatchingValues)) {
-            $this->sectionFailures[$responseSection->getIdentifier()] = 'Could not assert all values for "' . $this->table . '.' . $this->field . '": ' . implode(', ', $nonMatchingValues);
-            return false;
-        }
-
-        return true;
-    }
-
-    /**
-     * Returns a string representation of the constraint.
-     *
-     * @return string
-     */
-    public function toString()
-    {
-        return 'response has records';
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/StructureDoesNotHaveRecordConstraint.php b/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/StructureDoesNotHaveRecordConstraint.php
deleted file mode 100644 (file)
index 5034771..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Constraint\RequestSection;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseSection;
-
-/**
- * Model of frontend response
- */
-class StructureDoesNotHaveRecordConstraint extends AbstractStructureRecordConstraint
-{
-    /**
-     * @param ResponseSection $responseSection
-     * @return bool
-     */
-    protected function matchesSection(ResponseSection $responseSection)
-    {
-        $matchingVariants = [];
-
-        foreach ($responseSection->findStructures($this->recordIdentifier, $this->recordField) as $path => $structure) {
-            if (empty($structure) || !is_array($structure)) {
-                $this->sectionFailures[$responseSection->getIdentifier()] = 'No records found in "' . $path . '"';
-                return false;
-            }
-
-            $nonMatchingValues = $this->getNonMatchingValues($structure);
-            $matchingValues = array_diff($this->values, $nonMatchingValues);
-
-            if (!empty($matchingValues)) {
-                $matchingVariants[$path] = $matchingValues;
-            }
-        }
-
-        if (empty($matchingVariants)) {
-            return true;
-        }
-
-        $matchingMessage = '';
-        foreach ($matchingVariants as $path => $matchingValues) {
-            $matchingMessage .= '  * Found in "' . $path . '": ' . implode(', ', $matchingValues);
-        }
-
-        $this->sectionFailures[$responseSection->getIdentifier()] = 'Could not assert not having values for "' . $this->table . '.' . $this->field . '"' . LF . $matchingMessage;
-        return false;
-    }
-
-    /**
-     * Returns a string representation of the constraint.
-     *
-     * @return string
-     */
-    public function toString()
-    {
-        return 'structure does not have record';
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/StructureHasRecordConstraint.php b/components/testing_framework/Classes/Core/Functional/Framework/Constraint/RequestSection/StructureHasRecordConstraint.php
deleted file mode 100644 (file)
index bb435b6..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Constraint\RequestSection;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseSection;
-
-/**
- * Model of frontend response
- */
-class StructureHasRecordConstraint extends AbstractStructureRecordConstraint
-{
-    /**
-     * @param ResponseSection $responseSection
-     * @return bool
-     */
-    protected function matchesSection(ResponseSection $responseSection)
-    {
-        $nonMatchingVariants = [];
-        $remainingRecordVariants = [];
-
-        foreach ($responseSection->findStructures($this->recordIdentifier, $this->recordField) as $path => $structure) {
-            if (empty($structure) || !is_array($structure)) {
-                $this->sectionFailures[$responseSection->getIdentifier()] = 'No records found in "' . $path . '"';
-                return false;
-            }
-
-            $remainingRecords = [];
-            $nonMatchingValues = $this->getNonMatchingValues($structure);
-
-            if ($this->strict) {
-                $remainingRecords = $this->getRemainingRecords($structure);
-            }
-
-            if (empty($nonMatchingValues) && (!$this->strict || empty($remainingRecords))) {
-                return true;
-            }
-
-            if (!empty($nonMatchingValues)) {
-                $nonMatchingVariants[$path] = $nonMatchingValues;
-            }
-            if ($this->strict && !empty($remainingRecords)) {
-                $remainingRecordVariants[$path] = $remainingRecords;
-            }
-        }
-
-        $failureMessage = '';
-
-        if (!empty($nonMatchingVariants)) {
-            $failureMessage .= 'Could not assert all values for "' . $this->table . '.' . $this->field . '"' . LF;
-            foreach ($nonMatchingVariants as $path => $nonMatchingValues) {
-                $failureMessage .= '  * Not found in "' . $path . '": ' . implode(', ', $nonMatchingValues) . LF;
-            }
-        }
-
-        if (!empty($remainingRecordVariants)) {
-            $failureMessage .= 'Found remaining records for "' . $this->table . '.' . $this->field . '"' . LF;
-            foreach ($remainingRecordVariants as $path => $remainingRecords) {
-                $failureMessage .= '  * Found in "' . $path . '": ' . implode(', ', array_keys($remainingRecords)) . LF;
-            }
-        }
-
-        $this->sectionFailures[$responseSection->getIdentifier()] = $failureMessage;
-        return false;
-    }
-
-    /**
-     * Returns a string representation of the constraint.
-     *
-     * @return string
-     */
-    public function toString()
-    {
-        return 'structure has record';
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Collector.php b/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Collector.php
deleted file mode 100644 (file)
index 80bf10b..0000000
+++ /dev/null
@@ -1,198 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Model of frontend response
- */
-class Collector implements \TYPO3\CMS\Core\SingletonInterface
-{
-    /**
-     * @var array
-     */
-    protected $tableFields;
-
-    /**
-     * @var array
-     */
-    protected $structure = [];
-
-    /**
-     * @var array
-     */
-    protected $structurePaths = [];
-
-    /**
-     * @var array
-     */
-    protected $records = [];
-
-    /**
-     * @var \TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer
-     */
-    public $cObj;
-
-    public function addRecordData($content, array $configuration = null)
-    {
-        $recordIdentifier = $this->cObj->currentRecord;
-        list($tableName) = explode(':', $recordIdentifier);
-        $currentWatcherValue = $this->getCurrentWatcherValue();
-        $position = strpos($currentWatcherValue, '/' . $recordIdentifier);
-
-        $recordData = $this->filterFields($tableName, $this->cObj->data);
-        $this->records[$recordIdentifier] = $recordData;
-
-        if ($currentWatcherValue === $recordIdentifier) {
-            $this->structure[$recordIdentifier] = $recordData;
-            $this->structurePaths[$recordIdentifier] = [[]];
-        } elseif (!empty($position)) {
-            $levelIdentifier = substr($currentWatcherValue, 0, $position);
-            $this->addToStructure($levelIdentifier, $recordIdentifier, $recordData);
-        }
-    }
-
-    public function addFileData($content, array $configuration = null)
-    {
-        $currentFile = $this->cObj->getCurrentFile();
-
-        if ($currentFile instanceof \TYPO3\CMS\Core\Resource\File) {
-            $tableName = 'sys_file';
-        } elseif ($currentFile instanceof \TYPO3\CMS\Core\Resource\FileReference) {
-            $tableName = 'sys_file_reference';
-        } else {
-            return;
-        }
-
-        $recordData = $this->filterFields($tableName, $currentFile->getProperties());
-        $recordIdentifier = $tableName . ':' . $currentFile->getUid();
-        $this->records[$recordIdentifier] = $recordData;
-
-        $currentWatcherValue = $this->getCurrentWatcherValue();
-        $levelIdentifier = rtrim($currentWatcherValue, '/');
-        $this->addToStructure($levelIdentifier, $recordIdentifier, $recordData);
-    }
-
-    /**
-     * @param string $tableName
-     * @param array $recordData
-     * @return array
-     */
-    protected function filterFields($tableName, array $recordData)
-    {
-        $recordData = array_intersect_key(
-            $recordData,
-            array_flip($this->getTableFields($tableName))
-        );
-        return $recordData;
-    }
-
-    protected function addToStructure($levelIdentifier, $recordIdentifier, array $recordData)
-    {
-        $steps = explode('/', $levelIdentifier);
-        $structurePaths = [];
-        $structure = &$this->structure;
-
-        foreach ($steps as $step) {
-            list($identifier, $fieldName) = explode('.', $step);
-            $structurePaths[] = $identifier;
-            $structurePaths[] = $fieldName;
-            if (!isset($structure[$identifier])) {
-                return;
-            }
-            $structure = &$structure[$identifier];
-            if (!isset($structure[$fieldName]) || !is_array($structure[$fieldName])) {
-                $structure[$fieldName] = [];
-            }
-            $structure = &$structure[$fieldName];
-        }
-
-        $structure[$recordIdentifier] = $recordData;
-        $this->structurePaths[$recordIdentifier][] = $structurePaths;
-    }
-
-    /**
-     * @param string $content
-     * @param NULL|array $configuration
-     */
-    public function attachSection($content, array $configuration = null)
-    {
-        $section = [
-            'structure' => $this->structure,
-            'structurePaths' => $this->structurePaths,
-            'records' => $this->records,
-        ];
-
-        $as = (!empty($configuration['as']) ? $configuration['as'] : null);
-        $this->getRenderer()->addSection($section, $as);
-        $this->reset();
-    }
-
-    /**
-     * @param string $tableName
-     * @return array
-     */
-    protected function getTableFields($tableName)
-    {
-        if (!isset($this->tableFields) && !empty($this->getFrontendController()->tmpl->setup['config.']['watcher.']['tableFields.'])) {
-            $this->tableFields = $this->getFrontendController()->tmpl->setup['config.']['watcher.']['tableFields.'];
-            foreach ($this->tableFields as &$fieldList) {
-                $fieldList = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $fieldList, true);
-            }
-            unset($fieldList);
-        }
-
-        return !empty($this->tableFields[$tableName]) ? $this->tableFields[$tableName] : [];
-    }
-
-    /**
-     * @return string
-     */
-    protected function getCurrentWatcherValue()
-    {
-        $watcherValue = null;
-        if (isset($this->getFrontendController()->register['watcher'])) {
-            $watcherValue = $this->getFrontendController()->register['watcher'];
-        }
-        return $watcherValue;
-    }
-
-    /**
-     * @return Renderer
-     */
-    protected function getRenderer()
-    {
-        return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-            \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Renderer::class
-        );
-    }
-
-    /**
-     * @return \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController
-     */
-    protected function getFrontendController()
-    {
-        return $GLOBALS['TSFE'];
-    }
-
-    /**
-     * Collector needs to be reset after attaching a section, otherwise records will pile up.
-     */
-    protected function reset()
-    {
-        $this->structure = [];
-        $this->structurePaths = [];
-        $this->records = [];
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Hook/BackendUserHandler.php b/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Hook/BackendUserHandler.php
deleted file mode 100644 (file)
index 3fc3259..0000000
+++ /dev/null
@@ -1,59 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Hook;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Handler for backend user
- */
-class BackendUserHandler implements \TYPO3\CMS\Core\SingletonInterface
-{
-    /**
-     * @param array $parameters
-     * @param \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $frontendController
-     */
-    public function initialize(array $parameters, \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $frontendController)
-    {
-        $backendUserId = (int)GeneralUtility::_GP('backendUserId');
-        $workspaceId = (int)GeneralUtility::_GP('workspaceId');
-
-        if (empty($backendUserId) || empty($workspaceId)) {
-            return;
-        }
-
-        $backendUser = $this->createBackendUser();
-        $backendUser->user = GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getConnectionForTable('be_users')
-            ->select(['*'], 'be_users', ['uid' => $backendUserId])
-            ->fetch();
-        $backendUser->setTemporaryWorkspace($workspaceId);
-        $frontendController->beUserLogin = true;
-
-        $parameters['BE_USER'] = $backendUser;
-        $GLOBALS['BE_USER'] = $backendUser;
-    }
-
-    /**
-     * @return \TYPO3\CMS\Backend\FrontendBackendUserAuthentication
-     */
-    protected function createBackendUser()
-    {
-        return GeneralUtility::makeInstance(
-            \TYPO3\CMS\Backend\FrontendBackendUserAuthentication::class
-        );
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Hook/FrontendUserHandler.php b/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Hook/FrontendUserHandler.php
deleted file mode 100644 (file)
index d75d2ed..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Hook;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Handler for frontend user
- */
-class FrontendUserHandler implements \TYPO3\CMS\Core\SingletonInterface
-{
-    /**
-     * Initialize
-     *
-     * @param array $parameters
-     * @param \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $frontendController
-     */
-    public function initialize(array $parameters, \TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController $frontendController)
-    {
-        $frontendUserId = (int)GeneralUtility::_GP('frontendUserId');
-        $frontendController->fe_user->checkPid = 0;
-
-        $frontendUser = GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getConnectionForTable('fe_users')
-            ->select(['*'], 'fe_users', ['uid' => $frontendUserId])
-            ->fetch();
-        if (is_array($frontendUser)) {
-            $frontendController->loginUser = 1;
-            $frontendController->fe_user->createUserSession($frontendUser);
-            $frontendController->fe_user->user = $GLOBALS['TSFE']->fe_user->fetchUserSession();
-            $frontendController->initUserGroups();
-        }
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Parser.php b/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Parser.php
deleted file mode 100644 (file)
index 01718be..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Model of frontend response
- */
-class Parser implements \TYPO3\CMS\Core\SingletonInterface
-{
-    /**
-     * @var array
-     */
-    protected $paths = [];
-
-    /**
-     * @var array
-     */
-    protected $records = [];
-
-    /**
-     * @return array
-     */
-    public function getPaths()
-    {
-        return $this->paths;
-    }
-
-    /**
-     * @return array
-     */
-    public function getRecords()
-    {
-        return $this->records;
-    }
-
-    /**
-     * @param array $structure
-     * @param array $path
-     */
-    public function parse(array $structure, array $path = [])
-    {
-        $this->process($structure);
-    }
-
-    /**
-     * @param array $iterator
-     * @param array $path
-     */
-    protected function process(array $iterator, array $path = [])
-    {
-        foreach ($iterator as $identifier => $properties) {
-            $this->addRecord($identifier, $properties);
-            $this->addPath($identifier, $path);
-            foreach ($properties as $propertyName => $propertyValue) {
-                if (!is_array($propertyValue)) {
-                    continue;
-                }
-                $nestedPath = array_merge($path, [$identifier, $propertyName]);
-                $this->process($propertyValue, $nestedPath);
-            }
-        }
-    }
-
-    /**
-     * @param string $identifier
-     * @param array $properties
-     */
-    protected function addRecord($identifier, array $properties)
-    {
-        if (isset($this->records[$identifier])) {
-            return;
-        }
-
-        foreach ($properties as $propertyName => $propertyValue) {
-            if (is_array($propertyValue)) {
-                unset($properties[$propertyName]);
-            }
-        }
-
-        $this->records[$identifier] = $properties;
-    }
-
-    /**
-     * @param string $identifier
-     * @param array $path
-     */
-    protected function addPath($identifier, array $path)
-    {
-        if (!isset($this->paths[$identifier])) {
-            $this->paths[$identifier] = [];
-        }
-
-        $this->paths[$identifier][] = $path;
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Renderer.php b/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Renderer.php
deleted file mode 100644 (file)
index 8172b06..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Model of frontend response
- */
-class Renderer implements \TYPO3\CMS\Core\SingletonInterface
-{
-    /**
-     * @var array
-     */
-    protected $sections = [];
-
-    /**
-     * @param string $content
-     * @param NULL|array $configuration
-     */
-    public function parseValues($content, array $configuration = null)
-    {
-        if (empty($content)) {
-            return;
-        }
-
-        $values = json_decode($content, true);
-
-        if (empty($values) || !is_array($values)) {
-            return;
-        }
-
-        $asPrefix = (!empty($configuration['as']) ? $configuration['as'] . ':' : null);
-        foreach ($values as $identifier => $structure) {
-            $parser = $this->createParser();
-            $parser->parse($structure);
-
-            $section = [
-                'structure' => $structure,
-                'structurePaths' => $parser->getPaths(),
-                'records' => $parser->getRecords(),
-            ];
-
-            $this->addSection($section, $asPrefix . $identifier);
-        }
-    }
-
-    /**
-     * @param array $section
-     * @param NULL|string $as
-     */
-    public function addSection(array $section, $as = null)
-    {
-        if (!empty($as)) {
-            $this->sections[$as] = $section;
-        } else {
-            $this->sections[] = $section;
-        }
-    }
-
-    /**
-     * @param string $content
-     * @param NULL|array $configuration
-     * @return string
-     */
-    public function renderSections($content, array $configuration = null)
-    {
-        $content = json_encode($this->sections);
-        return $content;
-    }
-
-    /**
-     * @return Parser
-     */
-    protected function createParser()
-    {
-        return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
-            \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Parser::class
-        );
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Frontend/RequestBootstrap.php b/components/testing_framework/Classes/Core/Functional/Framework/Frontend/RequestBootstrap.php
deleted file mode 100644 (file)
index 8e4304d..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Bootstrap for direct CLI Request
- */
-class RequestBootstrap
-{
-    /**
-     * This method is necessary to set any superglobals like $_SERVER, $_POST, $_COOKIE, $_GET
-     * to start clean for a functional test.
-     *
-     * @param array $requestArguments usually JSON encoded arguments, should include "documentRoot" and "requestUrl"
-     */
-    public static function setGlobalVariables(array $requestArguments = null)
-    {
-        if (empty($requestArguments)) {
-            die('No JSON encoded arguments given');
-        }
-
-        if (empty($requestArguments['documentRoot'])) {
-            die('No documentRoot given');
-        }
-
-        if (empty($requestArguments['requestUrl']) || ($requestUrlParts = parse_url($requestArguments['requestUrl'])) === false) {
-            die('No valid request URL given');
-        }
-
-        // Populating $_GET and $_REQUEST is query part is set:
-        if (isset($requestUrlParts['query'])) {
-            parse_str($requestUrlParts['query'], $_GET);
-            parse_str($requestUrlParts['query'], $_REQUEST);
-        }
-
-        // Populating $_POST
-        $_POST = [];
-        // Populating $_COOKIE
-        $_COOKIE = [];
-
-        // Setting up the server environment
-        $_SERVER = [];
-        $_SERVER['DOCUMENT_ROOT'] = $requestArguments['documentRoot'];
-        $_SERVER['HTTP_USER_AGENT'] = 'TYPO3 Functional Test Request';
-        $_SERVER['HTTP_HOST'] = $_SERVER['SERVER_NAME'] = isset($requestUrlParts['host']) ? $requestUrlParts['host'] : 'localhost';
-        $_SERVER['SERVER_ADDR'] = $_SERVER['REMOTE_ADDR'] = '127.0.0.1';
-        $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF'] = '/index.php';
-        $_SERVER['SCRIPT_FILENAME'] = $_SERVER['_'] = $_SERVER['PATH_TRANSLATED'] = $requestArguments['documentRoot'] . '/index.php';
-        $_SERVER['QUERY_STRING'] = (isset($requestUrlParts['query']) ? $requestUrlParts['query'] : '');
-        $_SERVER['REQUEST_URI'] = $requestUrlParts['path'] . (isset($requestUrlParts['query']) ? '?' . $requestUrlParts['query'] : '');
-        $_SERVER['REQUEST_METHOD'] = 'GET';
-
-        // Define HTTPS and server port:
-        if (isset($requestUrlParts['scheme'])) {
-            if ($requestUrlParts['scheme'] === 'https') {
-                $_SERVER['HTTPS'] = 'on';
-                $_SERVER['SERVER_PORT'] = '443';
-            } else {
-                $_SERVER['SERVER_PORT'] = '80';
-            }
-        }
-
-        // Define a port if used in the URL:
-        if (isset($requestUrlParts['port'])) {
-            $_SERVER['SERVER_PORT'] = $requestUrlParts['port'];
-        }
-
-        if (!is_dir($_SERVER['DOCUMENT_ROOT'])) {
-            die('Document root directory "' . $_SERVER['DOCUMENT_ROOT'] . '" does not exist');
-        }
-
-        if (!is_file($_SERVER['SCRIPT_FILENAME'])) {
-            die('Script file "' . $_SERVER['SCRIPT_FILENAME'] . '" does not exist');
-        }
-    }
-
-    /**
-     * Calls the set SCRIPT_FILENAME and outputs the contents as JSON
-     */
-    public static function executeAndOutput()
-    {
-        global $TT, $TSFE, $TYPO3_CONF_VARS, $BE_USER, $TYPO3_MISC;
-
-        $result = ['status' => 'failure', 'content' => null, 'error' => null];
-
-        ob_start();
-        try {
-            chdir($_SERVER['DOCUMENT_ROOT']);
-            include($_SERVER['SCRIPT_FILENAME']);
-            $result['status'] = 'success';
-            $result['content'] = ob_get_contents();
-        } catch (\Exception $exception) {
-            $result['error'] = $exception->__toString();
-        }
-        ob_end_clean();
-
-        echo json_encode($result);
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Response.php b/components/testing_framework/Classes/Core/Functional/Framework/Frontend/Response.php
deleted file mode 100644 (file)
index 807363d..0000000
+++ /dev/null
@@ -1,109 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Model of frontend response
- */
-class Response
-{
-    const STATUS_Success = 'success';
-    const STATUS_Failure = 'failure';
-
-    /**
-     * @var string
-     */
-    protected $status;
-
-    /**
-     * @var NULL|string|array
-     */
-    protected $content;
-
-    /**
-     * @var string
-     */
-    protected $error;
-
-    /**
-     * @var ResponseContent
-     */
-    protected $responseSection;
-
-    /**
-     * @param string $status
-     * @param string $content
-     * @param string $error
-     */
-    public function __construct($status, $content, $error)
-    {
-        $this->status = $status;
-        $this->content = $content;
-        $this->error = $error;
-    }
-
-    /**
-     * @return string
-     */
-    public function getStatus()
-    {
-        return $this->status;
-    }
-
-    /**
-     * @return array|NULL|string
-     */
-    public function getContent()
-    {
-        return $this->content;
-    }
-
-    /**
-     * @return string
-     */
-    public function getError()
-    {
-        return $this->error;
-    }
-
-    /**
-     * @return ResponseContent
-     */
-    public function getResponseContent()
-    {
-        if (!isset($this->responseContent)) {
-            $this->responseContent = new ResponseContent($this);
-        }
-        return $this->responseContent;
-    }
-
-    /**
-     * @param mixed $sectionIdentifiers
-     * @return NULL|array|ResponseSection[]
-     */
-    public function getResponseSections(...$sectionIdentifiers)
-    {
-        if (empty($sectionIdentifiers)) {
-            $sectionIdentifiers = ['Default'];
-        }
-
-        $sections = [];
-        foreach ($sectionIdentifiers as $sectionIdentifier) {
-            $sections[] = $this->getResponseContent()->getSection($sectionIdentifier);
-        }
-
-        return $sections;
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Frontend/ResponseContent.php b/components/testing_framework/Classes/Core/Functional/Framework/Frontend/ResponseContent.php
deleted file mode 100644 (file)
index 3426d44..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Model of frontend response content
- */
-class ResponseContent
-{
-    /**
-     * @var array|ResponseSection[]
-     */
-    protected $sections;
-
-    /**
-     * @var array
-     */
-    protected $structure;
-
-    /**
-     * @var array
-     */
-    protected $structurePaths;
-
-    /**
-     * @var array
-     */
-    protected $records;
-
-    /**
-     * @var array
-     */
-    protected $queries;
-
-    /**
-     * @param Response $response
-     */
-    public function __construct(Response $response)
-    {
-        $content = json_decode($response->getContent(), true);
-
-        if ($content !== null && is_array($content)) {
-            foreach ($content as $sectionIdentifier => $sectionData) {
-                $section = new ResponseSection($sectionIdentifier, $sectionData);
-                $this->sections[$sectionIdentifier] = $section;
-            }
-        }
-    }
-
-    /**
-     * @param string $sectionIdentifier
-     * @return NULL|ResponseSection
-     * @throws \RuntimeException
-     */
-    public function getSection($sectionIdentifier)
-    {
-        if (isset($this->sections[$sectionIdentifier])) {
-            return $this->sections[$sectionIdentifier];
-        }
-
-        throw new \RuntimeException('ResponseSection "' . $sectionIdentifier . '" does not exist', 1476122151);
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/Framework/Frontend/ResponseSection.php b/components/testing_framework/Classes/Core/Functional/Framework/Frontend/ResponseSection.php
deleted file mode 100644 (file)
index bef4814..0000000
+++ /dev/null
@@ -1,139 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional\Framework\Frontend;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * Model of frontend response content
- */
-class ResponseSection
-{
-    /**
-     * @var string
-     */
-    protected $identifier;
-
-    /**
-     * @var array
-     */
-    protected $structure;
-
-    /**
-     * @var array
-     */
-    protected $structurePaths;
-
-    /**
-     * @var array
-     */
-    protected $records;
-
-    /**
-     * @var array
-     */
-    protected $queries;
-
-    /**
-     * @param string $identifier
-     * @param array $data
-     */
-    public function __construct($identifier, array $data)
-    {
-        $this->identifier = (string)$identifier;
-        $this->structure = $data['structure'];
-        $this->structurePaths = $data['structurePaths'];
-        $this->records = $data['records'];
-
-        if (!empty($data['queries'])) {
-            $this->queries = $data['queries'];
-        }
-    }
-
-    /**
-     * @return string
-     */
-    public function getIdentifier()
-    {
-        return $this->identifier;
-    }
-
-    /**
-     * @return array
-     */
-    public function getStructure()
-    {
-        return $this->structure;
-    }
-
-    /**
-     * @return array
-     */
-    public function getStructurePaths()
-    {
-        return $this->structurePaths;
-    }
-
-    /**
-     * @return array
-     */
-    public function getRecords()
-    {
-        return $this->records;
-    }
-
-    /**
-     * @return array
-     */
-    public function getQueries()
-    {
-        return $this->queries;
-    }
-
-    /**
-     * @param string $recordIdentifier
-     * @param string $fieldName
-     * @return array
-     */
-    public function findStructures($recordIdentifier, $fieldName = '')
-    {
-        $structures = [];
-
-        if (empty($this->structurePaths[$recordIdentifier])) {
-            return $structures;
-        }
-
-        foreach ($this->structurePaths[$recordIdentifier] as $steps) {
-            $structure = $this->structure;
-            $steps[] = $recordIdentifier;
-
-            if (!empty($fieldName)) {
-                $steps[] = $fieldName;
-            }
-
-            foreach ($steps as $step) {
-                if (!isset($structure[$step])) {
-                    $structure = null;
-                    break;
-                }
-                $structure = $structure[$step];
-            }
-
-            if (!empty($structure)) {
-                $structures[implode('/', $steps)] = $structure;
-            }
-        }
-
-        return $structures;
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Functional/FunctionalTestCase.php b/components/testing_framework/Classes/Core/Functional/FunctionalTestCase.php
deleted file mode 100644 (file)
index aee6c40..0000000
+++ /dev/null
@@ -1,764 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Functional;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use Doctrine\DBAL\DBALException;
-use Doctrine\DBAL\Platforms\MySqlPlatform;
-use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
-use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
-use TYPO3\CMS\Core\Cache\Backend\NullBackend;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Tests\Functional\DataHandling\Framework\DataSet;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\TestingFramework\Core\BaseTestCase;
-use TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Response;
-use TYPO3\TestingFramework\Core\Testbase;
-
-/**
- * Base test case class for functional tests, all TYPO3 CMS
- * functional tests should extend from this class!
- *
- * If functional tests need additional setUp() and tearDown() code,
- * they *must* call parent::setUp() and parent::tearDown() to properly
- * set up and destroy the test system.
- *
- * The functional test system creates a full new TYPO3 CMS instance
- * within typo3temp/ of the base system and the bootstraps this TYPO3 instance.
- * This abstract class takes care of creating this instance with its
- * folder structure and a LocalConfiguration, creates an own database
- * for each test run and imports tables of loaded extensions.
- *
- * Functional tests must be run standalone (calling native phpunit
- * directly) and can not be executed by eg. the ext:phpunit backend module.
- * Additionally, the script must be called from the document root
- * of the instance, otherwise path calculation is not successfully.
- *
- * Call whole functional test suite, example:
- * - cd /var/www/t3master/foo  # Document root of CMS instance, here is index.php of frontend
- * - typo3/../bin/phpunit -c components/testing_framework/core/Build/FunctionalTests.xml
- *
- * Call single test case, example:
- * - cd /var/www/t3master/foo  # Document root of CMS instance, here is index.php of frontend
- * - typo3/../bin/phpunit \
- *     --process-isolation \
- *     --bootstrap components/testing_framework/core/Build/FunctionalTestsBootstrap.php \
- *     typo3/sysext/core/Tests/Functional/DataHandling/DataHandlerTest.php
- */
-abstract class FunctionalTestCase extends BaseTestCase
-{
-    const DATABASE_PLATFORM_MYSQL = 'MySQL';
-    const DATABASE_PLATFORM_PDO = 'PDO';
-
-    /**
-     * Path to a XML fixture dependent on the current database.
-     * @var string
-     */
-    protected $fixturePath = '';
-
-    /**
-     * @var string
-     */
-    protected $databasePlatform;
-
-    /**
-     * An unique identifier for this test case. Location of the test
-     * instance and database name depend on this. Calculated early in setUp()
-     *
-     * @var string
-     */
-    protected $identifier;
-
-    /**
-     * Absolute path to test instance document root. Depends on $identifier.
-     * Calculated early in setUp()
-     *
-     * @var string
-     */
-    protected $instancePath;
-
-    /**
-     * Core extensions to load.
-     *
-     * If the test case needs additional core extensions as requirement,
-     * they can be noted here and will be added to LocalConfiguration
-     * extension list and ext_tables.sql of those extensions will be applied.
-     *
-     * This property will stay empty in this abstract, so it is possible
-     * to just overwrite it in extending classes. Extensions noted here will
-     * be loaded for every test of a test case and it is not possible to change
-     * the list of loaded extensions between single tests of a test case.
-     *
-     * A default list of core extensions is always loaded.
-     *
-     * @see FunctionalTestCaseUtility $defaultActivatedCoreExtensions
-     * @var array
-     */
-    protected $coreExtensionsToLoad = [];
-
-    /**
-     * Array of test/fixture extensions paths that should be loaded for a test.
-     *
-     * This property will stay empty in this abstract, so it is possible
-     * to just overwrite it in extending classes. Extensions noted here will
-     * be loaded for every test of a test case and it is not possible to change
-     * the list of loaded extensions between single tests of a test case.
-     *
-     * Given path is expected to be relative to your document root, example:
-     *
-     * array(
-     *   'typo3conf/ext/some_extension/Tests/Functional/Fixtures/Extensions/test_extension',
-     *   'typo3conf/ext/base_extension',
-     * );
-     *
-     * Extensions in this array are linked to the test instance, loaded
-     * and their ext_tables.sql will be applied.
-     *
-     * @var array
-     */
-    protected $testExtensionsToLoad = [];
-
-    /**
-     * Array of test/fixture folder or file paths that should be linked for a test.
-     *
-     * This property will stay empty in this abstract, so it is possible
-     * to just overwrite it in extending classes. Path noted here will
-     * be linked for every test of a test case and it is not possible to change
-     * the list of folders between single tests of a test case.
-     *
-     * array(
-     *   'link-source' => 'link-destination'
-     * );
-     *
-     * Given paths are expected to be relative to the test instance root.
-     * The array keys are the source paths and the array values are the destination
-     * paths, example:
-     *
-     * array(
-     *   'typo3/sysext/impext/Tests/Functional/Fixtures/Folders/fileadmin/user_upload' =>
-     *   'fileadmin/user_upload',
-     *   'typo3conf/ext/my_own_ext/Tests/Functional/Fixtures/Folders/uploads/tx_myownext' =>
-     *   'uploads/tx_myownext'
-     * );
-     *
-     * To be able to link from my_own_ext the extension path needs also to be registered in
-     * property $testExtensionsToLoad
-     *
-     * @var array
-     */
-    protected $pathsToLinkInTestInstance = [];
-
-    /**
-     * This configuration array is merged with TYPO3_CONF_VARS
-     * that are set in default configuration and factory configuration
-     *
-     * @var array
-     */
-    protected $configurationToUseInTestInstance = [];
-
-    /**
-     * Array of folders that should be created inside the test instance document root.
-     *
-     * This property will stay empty in this abstract, so it is possible
-     * to just overwrite it in extending classes. Path noted here will
-     * be linked for every test of a test case and it is not possible to change
-     * the list of folders between single tests of a test case.
-     *
-     * Per default the following folder are created
-     * /fileadmin
-     * /typo3temp
-     * /typo3conf
-     * /typo3conf/ext
-     * /uploads
-     *
-     * To create additional folders add the paths to this array. Given paths are expected to be
-     * relative to the test instance root and have to begin with a slash. Example:
-     *
-     * array(
-     *   'fileadmin/user_upload'
-     * );
-     *
-     * @var array
-     */
-    protected $additionalFoldersToCreate = [];
-
-    /**
-     * The fixture which is used when initializing a backend user
-     *
-     * @var string
-     */
-    protected $backendUserFixture = 'components/testing_framework/Resources/Core/Functional/Fixtures/be_users.xml';
-
-    /**
-     * Set up creates a test instance and database.
-     *
-     * This method should be called with parent::setUp() in your test cases!
-     *
-     * @throws \Doctrine\DBAL\DBALException
-     */
-    protected function setUp()
-    {
-        if (!defined('ORIGINAL_ROOT')) {
-            $this->markTestSkipped('Functional tests must be called through phpunit on CLI');
-        }
-
-        // Use a 7 char long hash of class name as identifier
-        $this->identifier = substr(sha1(get_class($this)), 0, 7);
-        $this->instancePath = ORIGINAL_ROOT . 'typo3temp/var/tests/functional-' . $this->identifier;
-
-        $testbase = new Testbase();
-        $testbase->defineTypo3ModeBe();
-        $testbase->setTypo3TestingContext();
-        if ($testbase->recentTestInstanceExists($this->instancePath)) {
-            // Reusing an existing instance. This typically happens for the second, third, ... test
-            // in a test case, so environment is set up only once per test case.
-            $testbase->setUpBasicTypo3Bootstrap($this->instancePath);
-            $testbase->initializeTestDatabaseAndTruncateTables();
-            $testbase->loadExtensionTables();
-        } else {
-            $testbase->removeOldInstanceIfExists($this->instancePath);
-            // Basic instance directory structure
-            $testbase->createDirectory($this->instancePath . '/fileadmin');
-            $testbase->createDirectory($this->instancePath . '/typo3temp/var/transient');
-            $testbase->createDirectory($this->instancePath . '/typo3temp/assets');
-            $testbase->createDirectory($this->instancePath . '/typo3conf/ext');
-            $testbase->createDirectory($this->instancePath . '/uploads');
-            // Additionally requested directories
-            foreach ($this->additionalFoldersToCreate as $directory) {
-                $testbase->createDirectory($this->instancePath . '/' . $directory);
-            }
-            $testbase->createLastRunTextfile($this->instancePath);
-            $testbase->setUpInstanceCoreLinks($this->instancePath);
-            $testbase->linkTestExtensionsToInstance($this->instancePath, $this->testExtensionsToLoad);
-            $testbase->linkPathsInTestInstance($this->instancePath, $this->pathsToLinkInTestInstance);
-            $localConfiguration['DB'] = $testbase->getOriginalDatabaseSettingsFromEnvironmentOrLocalConfiguration();
-            $originalDatabaseName = $localConfiguration['DB']['Connections']['Default']['dbname'];
-            // Append the unique identifier to the base database name to end up with a single database per test case
-            $localConfiguration['DB']['Connections']['Default']['dbname'] = $originalDatabaseName . '_ft' . $this->identifier;
-            $testbase->testDatabaseNameIsNotTooLong($originalDatabaseName, $localConfiguration);
-            // Set some hard coded base settings for the instance. Those could be overruled by
-            // $this->configurationToUseInTestInstance if needed again.
-            $localConfiguration['SYS']['isInitialInstallationInProgress'] = false;
-            $localConfiguration['SYS']['isInitialDatabaseImportDone'] = true;
-            $localConfiguration['SYS']['displayErrors'] = '1';
-            $localConfiguration['SYS']['debugExceptionHandler'] = '';
-            $localConfiguration['SYS']['trustedHostsPattern'] = '.*';
-            // @todo: This should be moved over to DB/Connections/Default/initCommands
-            $localConfiguration['SYS']['setDBinit'] = 'SET SESSION sql_mode = \'STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_VALUE_ON_ZERO,NO_ENGINE_SUBSTITUTION,NO_ZERO_DATE,NO_ZERO_IN_DATE,ONLY_FULL_GROUP_BY\';';
-            $localConfiguration['SYS']['caching']['cacheConfigurations']['extbase_object']['backend'] = NullBackend::class;
-            $testbase->setUpLocalConfiguration($this->instancePath, $localConfiguration, $this->configurationToUseInTestInstance);
-            $defaultCoreExtensionsToLoad = [
-                'core',
-                'backend',
-                'frontend',
-                'lang',
-                'extbase',
-                'install',
-            ];
-            $testbase->setUpPackageStates($this->instancePath, $defaultCoreExtensionsToLoad, $this->coreExtensionsToLoad, $this->testExtensionsToLoad);
-            $testbase->setUpBasicTypo3Bootstrap($this->instancePath);
-            $testbase->setUpTestDatabase($localConfiguration['DB']['Connections']['Default']['dbname'], $originalDatabaseName);
-            $testbase->loadExtensionTables();
-            $testbase->createDatabaseStructure();
-        }
-
-        $databasePlatform = $this->getConnectionPool()
-            ->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME)
-            ->getDatabasePlatform();
-
-        if ($databasePlatform instanceof MySqlPlatform) {
-            $this->setDatabasePlatform(static::DATABASE_PLATFORM_MYSQL);
-        } else {
-            $this->setDatabasePlatform(static::DATABASE_PLATFORM_PDO);
-        }
-    }
-
-    /**
-     * Get DatabaseConnection instance - $GLOBALS['TYPO3_DB']
-     *
-     * This method should be used instead of direct access to
-     * $GLOBALS['TYPO3_DB'] for easy IDE auto completion.
-     *
-     * @return \TYPO3\CMS\Core\Database\DatabaseConnection
-     * @deprecated since TYPO3 v8, will be removed in TYPO3 v9
-     */
-    protected function getDatabaseConnection()
-    {
-        GeneralUtility::logDeprecatedFunction();
-        return $GLOBALS['TYPO3_DB'];
-    }
-
-    /**
-     * @return ConnectionPool
-     */
-    protected function getConnectionPool()
-    {
-        return GeneralUtility::makeInstance(ConnectionPool::class);
-    }
-
-    /**
-     * Initialize backend user
-     *
-     * @param int $userUid uid of the user we want to initialize. This user must exist in the fixture file
-     * @return BackendUserAuthentication
-     * @throws Exception
-     */
-    protected function setUpBackendUserFromFixture($userUid)
-    {
-        $this->importDataSet(ORIGINAL_ROOT . $this->backendUserFixture);
-
-        $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('be_users');
-        $queryBuilder->getRestrictions()->removeAll();
-
-        $userRow = $queryBuilder->select('*')
-            ->from('be_users')
-            ->where($queryBuilder->expr()->eq('uid', $queryBuilder->createNamedParameter($userUid, \PDO::PARAM_INT)))
-            ->execute()
-            ->fetch();
-
-        /** @var $backendUser BackendUserAuthentication */
-        $backendUser = GeneralUtility::makeInstance(BackendUserAuthentication::class);
-        $sessionId = $backendUser->createSessionId();
-        $_COOKIE['be_typo_user'] = $sessionId;
-        $backendUser->id = $sessionId;
-        $backendUser->sendNoCacheHeaders = false;
-        $backendUser->dontSetCookie = true;
-        $backendUser->createUserSession($userRow);
-
-        $GLOBALS['BE_USER'] = $backendUser;
-        $GLOBALS['BE_USER']->start();
-        if (!is_array($GLOBALS['BE_USER']->user) || !$GLOBALS['BE_USER']->user['uid']) {
-            throw new Exception(
-                'Can not initialize backend user',
-                1377095807
-            );
-        }
-        $GLOBALS['BE_USER']->backendCheckLogin();
-
-        return $backendUser;
-    }
-
-    /**
-     * Imports a data set represented as XML into the test database,
-     *
-     * @param string $path Absolute path to the XML file containing the data set to load
-     * @throws Exception
-     */
-    protected function importDataSet($path)
-    {
-        $testbase = new Testbase();
-        $testbase->importXmlDatabaseFixture($path);
-    }
-
-    /**
-     * Import data from a CSV file to database
-     * Single file can contain data from multiple tables
-     *
-     * @param string $path absolute path to the CSV file containing the data set to load
-     */
-    public function importCSVDataSet($path)
-    {
-        $dataSet = DataSet::read($path, true);
-
-        foreach ($dataSet->getTableNames() as $tableName) {
-            $connection = $this->getConnectionPool()->getConnectionForTable($tableName);
-            foreach ($dataSet->getElements($tableName) as $element) {
-                try {
-                    $connection->insert($tableName, $element);
-                } catch (DBALException $e) {
-                    $this->fail('SQL Error for table "' . $tableName . '": ' . LF . $e->getMessage());
-                }
-            }
-            Testbase::resetTableSequences($connection, $tableName);
-        }
-    }
-
-    /**
-     * Compare data in database with CSV file
-     *
-     * @param string $path absolute path to the CSV file
-     */
-    protected function assertCSVDataSet($path)
-    {
-        $fileName = GeneralUtility::getFileAbsFileName($path);
-
-        $dataSet = DataSet::read($fileName);
-        $failMessages = [];
-
-        foreach ($dataSet->getTableNames() as $tableName) {
-            $hasUidField = ($dataSet->getIdIndex($tableName) !== null);
-            $records = $this->getAllRecords($tableName, $hasUidField);
-            foreach ($dataSet->getElements($tableName) as $assertion) {
-                $result = $this->assertInRecords($assertion, $records);
-                if ($result === false) {
-                    if ($hasUidField && empty($records[$assertion['uid']])) {
-                        $failMessages[] = 'Record "' . $tableName . ':' . $assertion['uid'] . '" not found in database';
-                        continue;
-                    }
-                    $recordIdentifier = $tableName . ($hasUidField ? ':' . $assertion['uid'] : '');
-                    $additionalInformation = ($hasUidField ? $this->renderRecords($assertion, $records[$assertion['uid']]) : $this->arrayToString($assertion));
-                    $failMessages[] = 'Assertion in data-set failed for "' . $recordIdentifier . '":' . LF . $additionalInformation;
-                    // Unset failed asserted record
-                    if ($hasUidField) {
-                        unset($records[$assertion['uid']]);
-                    }
-                } else {
-                    // Unset asserted record
-                    unset($records[$result]);
-                    // Increase assertion counter
-                    $this->assertTrue($result !== false);
-                }
-            }
-            if (!empty($records)) {
-                foreach ($records as $record) {
-                    $recordIdentifier = $tableName . ':' . $record['uid'];
-                    $emptyAssertion = array_fill_keys($dataSet->getFields($tableName), '[none]');
-                    $reducedRecord = array_intersect_key($record, $emptyAssertion);
-                    $additionalInformation = ($hasUidField ? $this->renderRecords($emptyAssertion, $reducedRecord) : $this->arrayToString($reducedRecord));
-                    $failMessages[] = 'Not asserted record found for "' . $recordIdentifier . '":' . LF . $additionalInformation;
-                }
-            }
-        }
-
-        if (!empty($failMessages)) {
-            $this->fail(implode(LF, $failMessages));
-        }
-    }
-
-    /**
-     * Check if $expectedRecord is present in $actualRecords array
-     * and compares if all column values from matches
-     *
-     * @param array $expectedRecord
-     * @param array $actualRecords
-     * @return bool|int|string false if record is not found or some column value doesn't match
-     */
-    protected function assertInRecords(array $expectedRecord, array $actualRecords)
-    {
-        foreach ($actualRecords as $index => $record) {
-            $differentFields = $this->getDifferentFields($expectedRecord, $record);
-
-            if (empty($differentFields)) {
-                return $index;
-            }
-        }
-
-        return false;
-    }
-
-    /**
-     * Fetches all records from a database table
-     * Helper method for assertCSVDataSet
-     *
-     * @param string $tableName
-     * @param bool $hasUidField
-     * @return array
-     */
-    protected function getAllRecords($tableName, $hasUidField = false)
-    {
-        $queryBuilder = $this->getConnectionPool()
-            ->getQueryBuilderForTable($tableName);
-        $queryBuilder->getRestrictions()->removeAll();
-        $statement = $queryBuilder
-            ->select('*')
-            ->from($tableName)
-            ->execute();
-
-        if (!$hasUidField) {
-            return $statement->fetchAll();
-        }
-
-        $allRecords = [];
-        while ($record = $statement->fetch()) {
-            $index = $record['uid'];
-            $allRecords[$index] = $record;
-        }
-
-        return $allRecords;
-    }
-
-    /**
-     * Format array as human readable string. Used to format verbose error messages in assertCSVDataSet
-     *
-     * @param array $array
-     * @return string
-     */
-    protected function arrayToString(array $array)
-    {
-        $elements = [];
-        foreach ($array as $key => $value) {
-            if (is_array($value)) {
-                $value = $this->arrayToString($value);
-            }
-            $elements[] = "'" . $key . "' => '" . $value . "'";
-        }
-        return 'array(' . PHP_EOL . '   ' . implode(', ' . PHP_EOL . '   ', $elements) . PHP_EOL . ')' . PHP_EOL;
-    }
-
-    /**
-     * Format output showing difference between expected and actual db row in a human readable way
-     * Used to format verbose error messages in assertCSVDataSet
-     *
-     * @param array $assertion
-     * @param array $record
-     * @return string
-     */
-    protected function renderRecords(array $assertion, array $record)
-    {
-        $differentFields = $this->getDifferentFields($assertion, $record);
-        $columns = [
-            'fields' => ['Fields'],
-            'assertion' => ['Assertion'],
-            'record' => ['Record'],
-        ];
-        $lines = [];
-        $linesFromXmlValues = [];
-        $result = '';
-
-        foreach ($differentFields as $differentField) {
-            $columns['fields'][] = $differentField;
-            $columns['assertion'][] = ($assertion[$differentField] === null ? 'NULL' : $assertion[$differentField]);
-            $columns['record'][] = ($record[$differentField] === null ? 'NULL' : $record[$differentField]);
-        }
-
-        foreach ($columns as $columnIndex => $column) {
-            $columnLength = null;
-            foreach ($column as $value) {
-                if (strpos($value, '<?xml') === 0) {
-                    $value = '[see diff]';
-                }
-                $valueLength = strlen($value);
-                if (empty($columnLength) || $valueLength > $columnLength) {
-                    $columnLength = $valueLength;
-                }
-            }
-            foreach ($column as $valueIndex => $value) {
-                if (strpos($value, '<?xml') === 0) {
-                    if ($columnIndex === 'assertion') {
-                        try {
-                            $this->assertXmlStringEqualsXmlString((string)$value, (string)$record[$columns['fields'][$valueIndex]]);
-                        } catch (\PHPUnit_Framework_ExpectationFailedException $e) {
-                            $linesFromXmlValues[] = 'Diff for field "' . $columns['fields'][$valueIndex] . '":' . PHP_EOL . $e->getComparisonFailure()->getDiff();
-                        }
-                    }
-                    $value = '[see diff]';
-                }
-                $lines[$valueIndex][$columnIndex] = str_pad($value, $columnLength, ' ');
-            }
-        }
-
-        foreach ($lines as $line) {
-            $result .= implode('|', $line) . PHP_EOL;
-        }
-
-        foreach ($linesFromXmlValues as $lineFromXmlValues) {
-            $result .= PHP_EOL . $lineFromXmlValues . PHP_EOL;
-        }
-
-        return $result;
-    }
-
-    /**
-     * Compares two arrays containing db rows and returns array containing column names which don't match
-     * It's a helper method used in assertCSVDataSet
-     *
-     * @param array $assertion
-     * @param array $record
-     * @return array
-     */
-    protected function getDifferentFields(array $assertion, array $record)
-    {
-        $differentFields = [];
-
-        foreach ($assertion as $field => $value) {
-            if (strpos($value, '\\*') === 0) {
-                continue;
-            } elseif (strpos($value, '<?xml') === 0) {
-                try {
-                    $this->assertXmlStringEqualsXmlString((string)$value, (string)$record[$field]);
-                } catch (\PHPUnit_Framework_ExpectationFailedException $e) {
-                    $differentFields[] = $field;
-                }
-            } elseif ($value === null && $record[$field] !== $value) {
-                $differentFields[] = $field;
-            } elseif ((string)$record[$field] !== (string)$value) {
-                $differentFields[] = $field;
-            }
-        }
-
-        return $differentFields;
-    }
-
-    /**
-     * @param int $pageId
-     * @param array $typoScriptFiles
-     */
-    protected function setUpFrontendRootPage($pageId, array $typoScriptFiles = [])
-    {
-        $pageId = (int)$pageId;
-
-        $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('pages');
-        $page = $connection->select(['*'], 'pages', ['uid' => $pageId])->fetch();
-
-        if (empty($page)) {
-            $this->fail('Cannot set up frontend root page "' . $pageId . '"');
-        }
-
-        $databasePlatform = 'mysql';
-        if ($connection->getDatabasePlatform() instanceof PostgreSqlPlatform) {
-            $databasePlatform = 'postgresql';
-        }
-
-        $connection->update(
-            'pages',
-            ['is_siteroot' => 1],
-            ['uid' => $pageId]
-        );
-
-        $templateFields = [
-            'pid' => $pageId,
-            'title' => '',
-            'constants' => 'databasePlatform = ' . $databasePlatform . LF,
-            'config' => '',
-            'clear' => 3,
-            'root' => 1,
-        ];
-
-        foreach ($typoScriptFiles as $typoScriptFile) {
-            $templateFields['config'] .= '<INCLUDE_TYPOSCRIPT: source="FILE:' . $typoScriptFile . '">' . LF;
-        }
-        $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable('sys_template');
-        $connection->delete('sys_template', ['pid' => $pageId]);
-        $connection->insert(
-            'sys_template',
-            $templateFields
-        );
-    }
-
-    /**
-     * @param int $pageId
-     * @param int $languageId
-     * @param int $backendUserId
-     * @param int $workspaceId
-     * @param bool $failOnFailure
-     * @param int $frontendUserId
-     * @return Response
-     */
-    protected function getFrontendResponse($pageId, $languageId = 0, $backendUserId = 0, $workspaceId = 0, $failOnFailure = true, $frontendUserId = 0)
-    {
-        $pageId = (int)$pageId;
-        $languageId = (int)$languageId;
-
-        $additionalParameter = '';
-
-        if (!empty($frontendUserId)) {
-            $additionalParameter .= '&frontendUserId=' . (int)$frontendUserId;
-        }
-        if (!empty($backendUserId)) {
-            $additionalParameter .= '&backendUserId=' . (int)$backendUserId;
-        }
-        if (!empty($workspaceId)) {
-            $additionalParameter .= '&workspaceId=' . (int)$workspaceId;
-        }
-
-        $arguments = [
-            'documentRoot' => $this->instancePath,
-            'requestUrl' => 'http://localhost/?id=' . $pageId . '&L=' . $languageId . $additionalParameter,
-        ];
-
-        $template = new \Text_Template(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Fixtures/Frontend/request.tpl');
-        $template->setVar(
-            [
-                'arguments' => var_export($arguments, true),
-                'originalRoot' => ORIGINAL_ROOT,
-            ]
-        );
-
-        $php = \PHPUnit_Util_PHP::factory();
-        $response = $php->runJob($template->render());
-        $result = json_decode($response['stdout'], true);
-
-        if ($result === null) {
-            $this->fail('Frontend Response is empty');
-        }
-
-        if ($failOnFailure && $result['status'] === Response::STATUS_Failure) {
-            $this->fail('Frontend Response has failure:' . LF . $result['error']);
-        }
-
-        $response = new Response($result['status'], $result['content'], $result['error']);
-        return $response;
-    }
-
-    /**
-     * Return the path to a XML fixture dependent on the current database platform that tests are run against.
-     *
-     * @param string $fileName
-     *
-     * @return string
-     * @throws \Exception
-     */
-    protected function getXmlFilePath(string $fileName): string
-    {
-        $baseDir = $this->fixturePath . $this->databasePlatform . '/';
-        $xmlFilePath = $baseDir . $fileName;
-
-        if (!file_exists($xmlFilePath)) {
-            throw new \Exception(
-                'XML fixture file "' . $xmlFilePath . '" not found for database platform: ' . $this->databasePlatform,
-                1487620903
-            );
-        }
-
-        return $xmlFilePath;
-    }
-
-    /**
-     * @return string
-     */
-    public function getDatabasePlatform(): string
-    {
-        return $this->databasePlatform;
-    }
-
-    /**
-     * @param string $databasePlatform
-     *
-     * @return $this
-     */
-    public function setDatabasePlatform(string $databasePlatform)
-    {
-        $this->databasePlatform = $databasePlatform;
-        return $this;
-    }
-
-    /**
-     * @return string
-     */
-    public function getFixturePath(): string
-    {
-        return $this->fixturePath;
-    }
-
-    /**
-     * @param string $fixturePath
-     *
-     * @return $this
-     */
-    public function setFixturePath(string $fixturePath)
-    {
-        $this->fixturePath = $fixturePath;
-        return $this;
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Testbase.php b/components/testing_framework/Classes/Core/Testbase.php
deleted file mode 100644 (file)
index 93545bc..0000000
+++ /dev/null
@@ -1,726 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use Doctrine\DBAL\DBALException;
-use Doctrine\DBAL\DriverManager;
-use Doctrine\DBAL\Platforms\PostgreSqlPlatform;
-use TYPO3\CMS\Core\Core\Bootstrap;
-use TYPO3\CMS\Core\Database\Connection;
-use TYPO3\CMS\Core\Database\ConnectionPool;
-use TYPO3\CMS\Core\Database\Schema\SchemaMigrator;
-use TYPO3\CMS\Core\Database\Schema\SqlReader;
-use TYPO3\CMS\Core\Utility\ArrayUtility;
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * This is a helper class used by unit, functional and acceptance test
- * environment builders.
- * It contains methods to create test environments.
- *
- * This class is for internal use only and may change wihtout further notice.
- *
- * Use the classes "UnitTestCase", "FunctionalTestCase" or "AcceptanceCoreEnvironment"
- * to indirectly benefit from this class in own extensions.
- */
-class Testbase
-{
-    /**
-     * This class must be called in CLI environment as a security measure
-     * against path disclosures and other stuff. Check this within
-     * constructor to make sure this check can't be circumvented.
-     */
-    public function __construct()
-    {
-        // Ensure cli only as security measure
-        if (PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg') {
-            die('This script supports command line usage only. Please check your command.');
-        }
-    }
-
-    /**
-     * Makes sure error messages during the tests get displayed no matter what is set in php.ini.
-     */
-    public function enableDisplayErrors()
-    {
-        @ini_set('display_errors', 1);
-    }
-
-    /**
-     * Defines a list of basic constants that are used by GeneralUtility and other
-     * helpers during tests setup. Those are sanitized in SystemEnvironmentBuilder
-     * to be not defined again.
-     *
-     * @see SystemEnvironmentBuilder::defineBaseConstants()
-     */
-    public function defineBaseConstants()
-    {
-        // A null, a tabulator, a linefeed, a carriage return, a substitution, a CR-LF combination
-        defined('NUL') ?: define('NUL', chr(0));
-        defined('TAB') ?: define('TAB', chr(9));
-        defined('LF') ?: define('LF', chr(10));
-        defined('CR') ?: define('CR', chr(13));
-        defined('SUB') ?: define('SUB', chr(26));
-        defined('CRLF') ?: define('CRLF', CR . LF);
-
-        if (!defined('TYPO3_OS')) {
-            // Operating system identifier
-            // Either "WIN" or empty string
-            $typoOs = '';
-            if (!stristr(PHP_OS, 'darwin') && !stristr(PHP_OS, 'cygwin') && stristr(PHP_OS, 'win')) {
-                $typoOs = 'WIN';
-            }
-            define('TYPO3_OS', $typoOs);
-        }
-    }
-
-    /**
-     * Defines the PATH_site and PATH_thisScript constant and sets $_SERVER['SCRIPT_NAME'].
-     * For unit tests only
-     */
-    public function defineSitePath()
-    {
-        define('PATH_site', $this->getWebRoot());
-        define('PATH_thisScript', PATH_site . 'typo3/cli_dispatch.phpsh');
-        $_SERVER['SCRIPT_NAME'] = PATH_thisScript;
-
-        if (!file_exists(PATH_thisScript)) {
-            $this->exitWithMessage('Unable to determine path to entry script. Please check your path or set an environment variable \'TYPO3_PATH_ROOT\' to your root path.');
-        }
-    }
-
-    /**
-     * Defines the constant ORIGINAL_ROOT for the path to the original TYPO3 document root.
-     * For functional / acceptance tests only
-     * If ORIGINAL_ROOT already is defined, this method is a no-op.
-     */
-    public function defineOriginalRootPath()
-    {
-        if (!defined('ORIGINAL_ROOT')) {
-            define('ORIGINAL_ROOT', $this->getWebRoot());
-        }
-
-        if (!file_exists(ORIGINAL_ROOT . 'typo3/cli_dispatch.phpsh')) {
-            $this->exitWithMessage('Unable to determine path to entry script. Please check your path or set an environment variable \'TYPO3_PATH_ROOT\' to your root path.');
-        }
-    }
-
-    /**
-     * Define TYPO3_MODE to BE
-     */
-    public function defineTypo3ModeBe()
-    {
-        define('TYPO3_MODE', 'BE');
-    }
-
-    /**
-     * Sets the environment variable TYPO3_CONTEXT to testing.
-     */
-    public function setTypo3TestingContext()
-    {
-        putenv('TYPO3_CONTEXT=Testing');
-    }
-
-    /**
-     * Creates directories, recursively if required.
-     *
-     * @param string $directory Absolute path to directories to create
-     * @throws Exception
-     */
-    public function createDirectory($directory)
-    {
-        if (is_dir($directory)) {
-            return;
-        }
-        @mkdir($directory, 0777, true);
-        clearstatcache();
-        if (!is_dir($directory)) {
-            throw new Exception('Directory "' . $directory . '" could not be created', 1404038665);
-        }
-    }
-
-    /**
-     * Checks whether given test instance exists in path and is younger than some minutes.
-     * Used in functional tests
-     *
-     * @param string $instancePath Absolute path to test instance
-     * @return bool
-     */
-    public function recentTestInstanceExists($instancePath)
-    {
-        if (@file_get_contents($instancePath . '/last_run.txt') <= (time() - 300)) {
-            return false;
-        } else {
-            // Test instance exists and is pretty young -> re-use
-            return true;
-        }
-    }
-
-    /**
-     * Remove test instance folder structure if it exists.
-     * This may happen if a functional test before threw a fatal or is too old
-     *
-     * @param string $instancePath Absolute path to test instance
-     * @throws Exception
-     */
-    public function removeOldInstanceIfExists($instancePath)
-    {
-        if (is_dir($instancePath)) {
-            $success = GeneralUtility::rmdir($instancePath, true);
-            if (!$success) {
-                throw new Exception(
-                    'Can not remove folder: ' . $instancePath,
-                    1376657210
-                );
-            }
-        }
-    }
-
-    /**
-     * Create last_run.txt file within instance path containing timestamp of "now".
-     * Used in functional tests to reuse an instance for multiple tests in one test case.
-     *
-     * @param string $instancePath Absolute path to test instance
-     */
-    public function createLastRunTextfile($instancePath)
-    {
-        // Store the time instance was created
-        file_put_contents($instancePath . '/last_run.txt', time());
-    }
-
-    /**
-     * Link TYPO3 CMS core from "parent" instance.
-     * For functional and acceptance tests.
-     *
-     * @param string $instancePath Absolute path to test instance
-     * @throws Exception
-     */
-    public function setUpInstanceCoreLinks($instancePath)
-    {
-        $linksToSet = [
-            ORIGINAL_ROOT . 'typo3' => $instancePath . '/typo3',
-            ORIGINAL_ROOT . 'index.php' => $instancePath . '/index.php'
-        ];
-        foreach ($linksToSet as $from => $to) {
-            $success = symlink($from, $to);
-            if (!$success) {
-                throw new Exception(
-                    'Creating link failed: from ' . $from . ' to: ' . $to,
-                    1376657199
-                );
-            }
-        }
-    }
-
-    /**
-     * Link test extensions to the typo3conf/ext folder of the instance.
-     * For functional and acceptance tests.
-     *
-     * @param string $instancePath Absolute path to test instance
-     * @param array $extensionPaths Contains paths to extensions relative to document root
-     * @throws Exception
-     */
-    public function linkTestExtensionsToInstance($instancePath, array $extensionPaths)
-    {
-        foreach ($extensionPaths as $extensionPath) {
-            $absoluteExtensionPath = ORIGINAL_ROOT . $extensionPath;
-            if (!is_dir($absoluteExtensionPath)) {
-                throw new Exception(
-                    'Test extension path ' . $absoluteExtensionPath . ' not found',
-                    1376745645
-                );
-            }
-            $destinationPath = $instancePath . '/typo3conf/ext/' . basename($absoluteExtensionPath);
-            $success = symlink($absoluteExtensionPath, $destinationPath);
-            if (!$success) {
-                throw new Exception(
-                    'Can not link extension folder: ' . $absoluteExtensionPath . ' to ' . $destinationPath,
-                    1376657142
-                );
-            }
-        }
-    }
-
-    /**
-     * Link paths inside the test instance, e.g. from a fixture fileadmin subfolder to the
-     * test instance fileadmin folder.
-     * For functional and acceptance tests.
-     *
-     * @param string $instancePath Absolute path to test instance
-     * @param array $pathsToLinkInTestInstance Contains paths as array of source => destination in key => value pairs of folders relative to test instance root
-     * @throws Exception if a source path could not be found and on failing creating the symlink
-     */
-    public function linkPathsInTestInstance($instancePath, array $pathsToLinkInTestInstance)
-    {
-        foreach ($pathsToLinkInTestInstance as $sourcePathToLinkInTestInstance => $destinationPathToLinkInTestInstance) {
-            $sourcePath = $instancePath . '/' . ltrim($sourcePathToLinkInTestInstance, '/');
-            if (!file_exists($sourcePath)) {
-                throw new Exception(
-                    'Path ' . $sourcePath . ' not found',
-                    1476109221
-                );
-            }
-            $destinationPath = $instancePath . '/' . ltrim($destinationPathToLinkInTestInstance, '/');
-            $success = symlink($sourcePath, $destinationPath);
-            if (!$success) {
-                throw new Exception(
-                    'Can not link the path ' . $sourcePath . ' to ' . $destinationPath,
-                    1389969623
-                );
-            }
-        }
-    }
-
-    /**
-     * Database settings for functional and acceptance tests can be either set by
-     * environment variables (recommended), or from an existing LocalConfiguration as fallback.
-     * The method fetches these.
-     *
-     * An unique name will be added to the database name later.
-     *
-     * @throws Exception
-     * @return array [DB][host], [DB][username], ...
-     */
-    public function getOriginalDatabaseSettingsFromEnvironmentOrLocalConfiguration()
-    {
-        $databaseName = trim(getenv('typo3DatabaseName'));
-        $databaseHost = trim(getenv('typo3DatabaseHost'));
-        $databaseUsername = trim(getenv('typo3DatabaseUsername'));
-        $databasePassword = getenv('typo3DatabasePassword');
-        $databasePasswordTrimmed = trim($databasePassword);
-        $databasePort = trim(getenv('typo3DatabasePort'));
-        $databaseSocket = trim(getenv('typo3DatabaseSocket'));
-        $databaseDriver = trim(getenv('typo3DatabaseDriver'));
-        if ($databaseName || $databaseHost || $databaseUsername || $databasePassword || $databasePort || $databaseSocket) {
-            // Try to get database credentials from environment variables first
-            $originalConfigurationArray = [
-                'DB' => [
-                    'Connections' => [
-                        'Default' => [
-                            'driver' => 'mysqli'
-                        ],
-                    ],
-                ],
-            ];
-            if ($databaseName) {
-                $originalConfigurationArray['DB']['Connections']['Default']['dbname'] = $databaseName;
-            }
-            if ($databaseHost) {
-                $originalConfigurationArray['DB']['Connections']['Default']['host'] = $databaseHost;
-            }
-            if ($databaseUsername) {
-                $originalConfigurationArray['DB']['Connections']['Default']['user'] = $databaseUsername;
-            }
-            if ($databasePassword !== false) {
-                $originalConfigurationArray['DB']['Connections']['Default']['password'] = $databasePasswordTrimmed;
-            }
-            if ($databasePort) {
-                $originalConfigurationArray['DB']['Connections']['Default']['port'] = $databasePort;
-            }
-            if ($databaseSocket) {
-                $originalConfigurationArray['DB']['Connections']['Default']['unix_socket'] = $databaseSocket;
-            }
-            if ($databaseDriver) {
-                $originalConfigurationArray['DB']['Connections']['Default']['driver'] = $databaseDriver;
-            }
-        } elseif (file_exists(ORIGINAL_ROOT . 'typo3conf/LocalConfiguration.php')) {
-            // See if a LocalConfiguration file exists in "parent" instance to get db credentials from
-            $originalConfigurationArray = require ORIGINAL_ROOT . 'typo3conf/LocalConfiguration.php';
-        } else {
-            throw new Exception(
-                'Database credentials for tests are neither set through environment'
-                . ' variables, and can not be found in an existing LocalConfiguration file',
-                1397406356
-            );
-        }
-        return $originalConfigurationArray['DB'];
-    }
-
-    /**
-     * Maximum length of database names is 64 chars in mysql. Test this is not exceeded
-     * after a suffix has been added.
-     *
-     * @param string $originalDatabaseName Base name of the database
-     * @param array $configuration "LocalConfiguration" array with DB settings
-     * @throws Exception
-     */
-    public function testDatabaseNameIsNotTooLong($originalDatabaseName, array $configuration)
-    {
-        // Maximum database name length for mysql is 64 characters
-        if (strlen($configuration['DB']['Connections']['Default']['dbname']) > 64) {
-            $suffixLength = strlen($configuration['DB']['Connections']['Default']['dbname']) - strlen($originalDatabaseName);
-            $maximumOriginalDatabaseName = 64 - $suffixLength;
-            throw new Exception(
-                'The name of the database that is used for the functional test (' . $originalDatabaseName . ')' .
-                ' exceeds the maximum length of 64 character allowed by MySQL. You have to shorten your' .
-                ' original database name to ' . $maximumOriginalDatabaseName . ' characters',
-                1377600104
-            );
-        }
-    }
-
-    /**
-     * Create LocalConfiguration.php file of the test instance.
-     * For functional and acceptance tests.
-     *
-     * @param string $instancePath Absolute path to test instance
-     * @param array $configuration Base configuration array
-     * @param array $overruleConfiguration Overrule factory and base configuration
-     * @throws Exception
-     */
-    public function setUpLocalConfiguration($instancePath, array $configuration, array $overruleConfiguration)
-    {
-        // Base of final LocalConfiguration is core factory configuration
-        $finalConfigurationArray = require ORIGINAL_ROOT . 'typo3/sysext/core/Configuration/FactoryConfiguration.php';
-        $finalConfigurationArray = array_replace_recursive($finalConfigurationArray, $configuration);
-        $finalConfigurationArray = array_replace_recursive($finalConfigurationArray, $overruleConfiguration);
-        $result = $this->writeFile(
-            $instancePath . '/typo3conf/LocalConfiguration.php',
-            '<?php' . chr(10) .
-            'return ' .
-            ArrayUtility::arrayExport(
-                $finalConfigurationArray
-            ) .
-            ';'
-        );
-        if (!$result) {
-            throw new Exception('Can not write local configuration', 1376657277);
-        }
-    }
-
-    /**
-     * Compile typo3conf/PackageStates.php containing default packages like core,
-     * a test specific list of additional core extensions, and a list of
-     * test extensions.
-     * For functional and acceptance tests.
-     *
-     * @param string $instancePath Absolute path to test instance
-     * @param array $defaultCoreExtensionsToLoad Default list of core extensions to load
-     * @param array $additionalCoreExtensionsToLoad Additional core extensions to load
-     * @param array $testExtensionPaths Paths to extensions relative to document root
-     * @throws Exception
-     */
-    public function setUpPackageStates(
-        $instancePath,
-        array $defaultCoreExtensionsToLoad,
-        array $additionalCoreExtensionsToLoad,
-        array $testExtensionPaths
-    ) {
-        $packageStates = [
-            'packages' => [],
-            'version' => 5,
-        ];
-
-        // Register default list of extensions and set active
-        foreach ($defaultCoreExtensionsToLoad as $extensionName) {
-            $packageStates['packages'][$extensionName] = [
-                'packagePath' => 'typo3/sysext/' . $extensionName . '/'
-            ];
-        }
-
-        // Register additional core extensions and set active
-        foreach ($additionalCoreExtensionsToLoad as $extensionName) {
-            $packageStates['packages'][$extensionName] = [
-                'packagePath' => 'typo3/sysext/' . $extensionName . '/'
-            ];
-        }
-
-        // Activate test extensions that have been symlinked before
-        foreach ($testExtensionPaths as $extensionPath) {
-            $extensionName = basename($extensionPath);
-            $packageStates['packages'][$extensionName] = [
-                'packagePath' => 'typo3conf/ext/' . $extensionName . '/'
-            ];
-        }
-
-        $result = $this->writeFile(
-            $instancePath . '/typo3conf/PackageStates.php',
-            '<?php' . chr(10) .
-            'return ' .
-            ArrayUtility::arrayExport(
-                $packageStates
-            ) .
-            ';'
-        );
-
-        if (!$result) {
-            throw new Exception('Can not write PackageStates', 1381612729);
-        }
-    }
-
-    /**
-     * Create a low level connection to dbms, without selecting the target database.
-     * Drop existing database if it exists and create a new one.
-     *
-     * @param string $databaseName Database name of this test instance
-     * @param string $originalDatabaseName Original database name before suffix was added
-     * @throws \TYPO3\TestingFramework\Core\Exception
-     */
-    public function setUpTestDatabase($databaseName, $originalDatabaseName)
-    {
-        Bootstrap::getInstance()->initializeTypo3DbGlobal();
-
-        // Drop database if exists. Directly using the Doctrine DriverManager to
-        // work around connection caching in ConnectionPool
-        $connectionParameters = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default'];
-        unset($connectionParameters['dbname']);
-        $schemaManager = DriverManager::getConnection($connectionParameters)->getSchemaManager();
-
-        if (in_array($databaseName, $schemaManager->listDatabases(), true)) {
-            $schemaManager->dropDatabase($databaseName);
-        }
-
-        try {
-            $schemaManager->createDatabase($databaseName);
-        } catch (DBALException $e) {
-            $user = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'];
-            $host = $GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'];
-            throw new Exception(
-                'Unable to create database with name ' . $databaseName . '. This is probably a permission problem.'
-                . ' For this instance this could be fixed executing:'
-                . ' GRANT ALL ON `' . $originalDatabaseName . '_%`.* TO `' . $user . '`@`' . $host . '`;'
-                . ' Original message thrown by database layer: ' . $e->getMessage(),
-                1376579070
-            );
-        }
-    }
-
-    /**
-     * Bootstrap basic TYPO3. This bootstraps TYPO3 far enough to initialize database afterwards.
-     * For functional and acceptance tests.
-     *
-     * @param string $instancePath Absolute path to test instance
-     */
-    public function setUpBasicTypo3Bootstrap($instancePath)
-    {
-        $_SERVER['PWD'] = $instancePath;
-        $_SERVER['argv'][0] = 'index.php';
-
-        $classLoader = require rtrim(realpath($instancePath . '/typo3'), '\\/') . '/../vendor/autoload.php';
-        Bootstrap::getInstance()
-            ->initializeClassLoader($classLoader)
-            ->setRequestType(TYPO3_REQUESTTYPE_BE | TYPO3_REQUESTTYPE_CLI)
-            ->baseSetup()
-            ->loadConfigurationAndInitialize(true)
-            ->loadTypo3LoadedExtAndExtLocalconf(true)
-            ->setFinalCachingFrameworkCacheConfiguration()
-            ->defineLoggingAndExceptionConstants()
-            ->unsetReservedGlobalVariables();
-    }
-
-    /**
-     * Truncate all tables.
-     * For functional and acceptance tests.
-     *
-     * @throws Exception
-     */
-    public function initializeTestDatabaseAndTruncateTables()
-    {
-        Bootstrap::getInstance()->initializeTypo3DbGlobal();
-
-        $connection = GeneralUtility::makeInstance(ConnectionPool::class)
-            ->getConnectionByName(ConnectionPool::DEFAULT_CONNECTION_NAME);
-        $schemaManager = $connection->getSchemaManager();
-
-        foreach ($schemaManager->listTables() as $table) {
-            $connection->truncate($table->getName());
-            self::resetTableSequences($connection, $table->getName());
-        }
-    }
-
-    /**
-     * Load ext_tables.php files.
-     * For functional and acceptance tests.
-     */
-    public function loadExtensionTables()
-    {
-        Bootstrap::getInstance()->loadBaseTca()->loadExtTables();
-    }
-
-    /**
-     * Create tables and import static rows.
-     * For functional and acceptance tests.
-     */
-    public function createDatabaseStructure()
-    {
-        $schemaMigrationService = GeneralUtility::makeInstance(SchemaMigrator::class);
-        $sqlReader = GeneralUtility::makeInstance(SqlReader::class);
-        $sqlCode = $sqlReader->getTablesDefinitionString(true);
-
-        $createTableStatements = $sqlReader->getCreateTableStatementArray($sqlCode);
-
-        $schemaMigrationService->install($createTableStatements);
-
-        $insertStatements = $sqlReader->getInsertStatementArray($sqlCode);
-        $schemaMigrationService->importStaticData($insertStatements);
-    }
-
-    /**
-     * Imports a data set represented as XML into the test database,
-     *
-     * @param string $path Absolute path to the XML file containing the data set to load
-     * @throws \Doctrine\DBAL\DBALException
-     * @throws \InvalidArgumentException
-     * @throws \RuntimeException
-     */
-    public function importXmlDatabaseFixture($path)
-    {
-        if (!is_file($path)) {
-            throw new \RuntimeException(
-                'Fixture file ' . $path . ' not found',
-                1376746261
-            );
-        }
-
-        $fileContent = file_get_contents($path);
-        // Disables the functionality to allow external entities to be loaded when parsing the XML, must be kept
-        $previousValueOfEntityLoader = libxml_disable_entity_loader(true);
-        $xml = simplexml_load_string($fileContent);
-        libxml_disable_entity_loader($previousValueOfEntityLoader);
-        $foreignKeys = [];
-
-        /** @var $table \SimpleXMLElement */
-        foreach ($xml->children() as $table) {
-            $insertArray = [];
-
-            /** @var $column \SimpleXMLElement */
-            foreach ($table->children() as $column) {
-                $columnName = $column->getName();
-                $columnValue = null;
-
-                if (isset($column['ref'])) {
-                    list($tableName, $elementId) = explode('#', $column['ref']);
-                    $columnValue = $foreignKeys[$tableName][$elementId];
-                } elseif (isset($column['is-NULL']) && ($column['is-NULL'] === 'yes')) {
-                    $columnValue = null;
-                } else {
-                    $columnValue = (string)$table->$columnName;
-                }
-
-                $insertArray[$columnName] = $columnValue;
-            }
-
-            $tableName = $table->getName();
-            $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($tableName);
-            $connection->insert(
-                $tableName,
-                $insertArray
-            );
-            static::resetTableSequences($connection, $tableName);
-
-            if (isset($table['id'])) {
-                $elementId = (string)$table['id'];
-                $foreignKeys[$tableName][$elementId] = $connection->lastInsertId($tableName);
-            }
-        }
-    }
-
-    /**
-     * Perform post processing of database tables after an insert has been performed.
-     * Doing this once per insert is rather slow, but due to the soft reference behavior
-     * this needs to be done after every row to ensure consistent results.
-     *
-     * @param \TYPO3\CMS\Core\Database\Connection $connection
-     * @param string $tableName
-     * @throws \Doctrine\DBAL\DBALException
-     */
-    public static function resetTableSequences(Connection $connection, string $tableName)
-    {
-        if ($connection->getDatabasePlatform() instanceof PostgreSqlPlatform) {
-            $queryBuilder = $connection->createQueryBuilder();
-            $queryBuilder->getRestrictions()->removeAll();
-            $row = $queryBuilder->select('PGT.schemaname', 'S.relname', 'C.attname', 'T.relname AS tablename')
-                ->from('pg_class', 'S')
-                ->from('pg_depend', 'D')
-                ->from('pg_class', 'T')
-                ->from('pg_attribute', 'C')
-                ->from('pg_tables', 'PGT')
-                ->where(
-                    $queryBuilder->expr()->eq('S.relkind', $queryBuilder->quote('S')),
-                    $queryBuilder->expr()->eq('S.oid', $queryBuilder->quoteIdentifier('D.objid')),
-                    $queryBuilder->expr()->eq('D.refobjid', $queryBuilder->quoteIdentifier('T.oid')),
-                    $queryBuilder->expr()->eq('D.refobjid', $queryBuilder->quoteIdentifier('C.attrelid')),
-                    $queryBuilder->expr()->eq('D.refobjsubid', $queryBuilder->quoteIdentifier('C.attnum')),
-                    $queryBuilder->expr()->eq('T.relname', $queryBuilder->quoteIdentifier('PGT.tablename')),
-                    $queryBuilder->expr()->eq('PGT.tablename', $queryBuilder->quote($tableName))
-                )
-                ->setMaxResults(1)
-                ->execute()
-                ->fetch();
-
-            if ($row !== false) {
-                $connection->exec(
-                    sprintf(
-                        'SELECT SETVAL(%s, COALESCE(MAX(%s), 0)+1, FALSE) FROM %s',
-                        $connection->quote($row['schemaname'] . '.' . $row['relname']),
-                        $connection->quoteIdentifier($row['attname']),
-                        $connection->quoteIdentifier($row['schemaname'] . '.' . $row['tablename'])
-                    )
-                );
-            }
-        }
-    }
-
-    /**
-     * Returns the absolute path the TYPO3 document root.
-     * This is the "original" document root, not the "instance" root for functional / acceptance tests.
-     *
-     * @return string the TYPO3 document root using Unix path separators
-     */
-    protected function getWebRoot()
-    {
-        if (getenv('TYPO3_PATH_ROOT')) {
-            $webRoot = getenv('TYPO3_PATH_ROOT');
-        } elseif (getenv('TYPO3_PATH_WEB')) {
-            // @deprecated
-            $webRoot = getenv('TYPO3_PATH_WEB');
-        } else {
-            $webRoot = getcwd();
-        }
-        return rtrim(strtr($webRoot, '\\', '/'), '/') . '/';
-    }
-
-    /**
-     * Send http headers, echo out a text message and exit with error code
-     *
-     * @param string $message
-     */
-    protected function exitWithMessage($message)
-    {
-        echo $message . LF;
-        exit(1);
-    }
-
-    /**
-     * Writes $content to the file $file. This is a simplified version
-     * of GeneralUtility::writeFile that does not fix permissions.
-     *
-     * @param string $file Filepath to write to
-     * @param string $content Content to write
-     * @return bool TRUE if the file was successfully opened and written to.
-     */
-    protected function writeFile($file, $content)
-    {
-        if ($fd = fopen($file, 'wb')) {
-            $res = fwrite($fd, $content);
-            fclose($fd);
-            if ($res === false) {
-                return false;
-            }
-            return true;
-        }
-        return false;
-    }
-}
diff --git a/components/testing_framework/Classes/Core/Unit/UnitTestCase.php b/components/testing_framework/Classes/Core/Unit/UnitTestCase.php
deleted file mode 100644 (file)
index 5cadd9a..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Core\Unit;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Core\Utility\PathUtility;
-use TYPO3\TestingFramework\Core\BaseTestCase;
-
-/**
- * Base test case for unit tests.
- *
- * This class currently only inherits the base test case. However, it is recommended
- * to extend this class for unit test cases instead of the base test case because if,
- * at some point, specific behavior needs to be implemented for unit tests, your test cases
- * will profit from it automatically.
- */
-abstract class UnitTestCase extends BaseTestCase
-{
-    /**
-     * @todo make LoadedExtensionsArray serializable instead
-     *
-     * @var array
-     */
-    protected $backupGlobalsBlacklist = ['TYPO3_LOADED_EXT'];
-
-    /**
-     * Absolute path to files that should be removed after a test.
-     * Handled in tearDown. Tests can register here to get any files
-     * within typo3temp/ or typo3conf/ext cleaned up again.
-     *
-     * @var array
-     */
-    protected $testFilesToDelete = [];
-
-    /**
-     * Unset all additional properties of test classes to help PHP
-     * garbage collection. This reduces memory footprint with lots
-     * of tests.
-     *
-     * If overwriting tearDown() in test classes, please call
-     * parent::tearDown() at the end. Unsetting of own properties
-     * is not needed this way.
-     *
-     * @throws \RuntimeException
-     */
-    protected function tearDown()
-    {
-        // Unset properties of test classes to safe memory
-        $reflection = new \ReflectionObject($this);
-        foreach ($reflection->getProperties() as $property) {
-            $declaringClass = $property->getDeclaringClass()->getName();
-            if (
-                !$property->isStatic()
-                && $declaringClass !== \TYPO3\TestingFramework\Core\Unit\UnitTestCase::class
-                && $declaringClass !== \TYPO3\TestingFramework\Core\BaseTestCase::class
-                && strpos($property->getDeclaringClass()->getName(), 'PHPUnit_') !== 0
-            ) {
-                $propertyName = $property->getName();
-                unset($this->$propertyName);
-            }
-        }
-        unset($reflection);
-
-        // Delete registered test files and directories
-        foreach ($this->testFilesToDelete as $absoluteFileName) {
-            $absoluteFileName = GeneralUtility::fixWindowsFilePath(PathUtility::getCanonicalPath($absoluteFileName));
-            if (!GeneralUtility::validPathStr($absoluteFileName)) {
-                throw new \RuntimeException('tearDown() cleanup: Filename contains illegal characters', 1410633087);
-            }
-            if (strpos($absoluteFileName, PATH_site . 'typo3temp/var/') !== 0) {
-                throw new \RuntimeException(
-                    'tearDown() cleanup:  Files to delete must be within typo3temp/var/',
-                    1410633412
-                );
-            }
-            // file_exists returns false for links pointing to not existing targets, so handle links before next check.
-            if (@is_link($absoluteFileName) || @is_file($absoluteFileName)) {
-                unlink($absoluteFileName);
-            } elseif (@is_dir($absoluteFileName)) {
-                GeneralUtility::rmdir($absoluteFileName, true);
-            } else {
-                throw new \RuntimeException('tearDown() cleanup: File, link or directory does not exist', 1410633510);
-            }
-        }
-        $this->testFilesToDelete = [];
-    }
-}
diff --git a/components/testing_framework/Classes/Fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php b/components/testing_framework/Classes/Fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php
deleted file mode 100644 (file)
index d49d080..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-<?php
-namespace TYPO3\TestingFramework\Fluid\Unit\ViewHelpers;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-use Prophecy\Argument;
-use Prophecy\Prophecy\ObjectProphecy;
-use TYPO3\CMS\Extbase\Error\Result;
-use TYPO3\CMS\Extbase\Reflection\ReflectionService;
-use TYPO3\CMS\Fluid\Core\Variables\CmsVariableProvider;
-use TYPO3\CMS\Fluid\Core\ViewHelper\AbstractViewHelper;
-use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
-use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInterface;
-use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperVariableContainer;
-
-/**
- * Base test class for testing view helpers
- */
-abstract class ViewHelperBaseTestcase extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
-{
-    /**
-     * @var ViewHelperVariableContainer|ObjectProphecy
-     */
-    protected $viewHelperVariableContainer;
-
-    /**
-     * @var CmsVariableProvider
-     */
-    protected $templateVariableContainer;
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder
-     */
-    protected $uriBuilder;
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext
-     */
-    protected $controllerContext;
-
-    /**
-     * @var TagBuilder
-     */
-    protected $tagBuilder;
-
-    /**
-     * @var array
-     */
-    protected $arguments;
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Web\Request
-     */
-    protected $request;
-
-    /**
-     * @var \TYPO3\CMS\Fluid\Core\Rendering\RenderingContext
-     */
-    protected $renderingContext;
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService
-     */
-    protected $mvcPropertyMapperConfigurationService;
-
-    /**
-     * Sets up all properties of a viewhelper needed to test a viewhelper
-     */
-    protected function setUp()
-    {
-        $this->viewHelperVariableContainer = $this->prophesize(ViewHelperVariableContainer::class);
-        $this->templateVariableContainer = $this->createMock(CmsVariableProvider::class);
-        $this->uriBuilder = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder::class);
-        $this->uriBuilder->expects($this->any())->method('reset')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setArguments')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setSection')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setFormat')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setCreateAbsoluteUri')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setAddQueryString')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setArgumentsToBeExcludedFromQueryString')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setLinkAccessRestrictedPages')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setTargetPageUid')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setTargetPageType')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setNoCache')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setUseCacheHash')->will($this->returnValue($this->uriBuilder));
-        $this->uriBuilder->expects($this->any())->method('setAddQueryStringMethod')->will($this->returnValue($this->uriBuilder));
-        $this->request = $this->prophesize(\TYPO3\CMS\Extbase\Mvc\Web\Request::class);
-        $this->controllerContext = $this->createMock(\TYPO3\CMS\Extbase\Mvc\Controller\ControllerContext::class);
-        $this->controllerContext->expects($this->any())->method('getUriBuilder')->will($this->returnValue($this->uriBuilder));
-        $this->controllerContext->expects($this->any())->method('getRequest')->will($this->returnValue($this->request->reveal()));
-        $this->arguments = [];
-        $this->renderingContext = $this->getAccessibleMock(\TYPO3\CMS\Fluid\Tests\Unit\Core\Rendering\RenderingContextFixture::class, ['getControllerContext']);
-        $this->renderingContext->expects($this->any())->method('getControllerContext')->willReturn($this->controllerContext);
-        $this->renderingContext->setVariableProvider($this->templateVariableContainer);
-        $this->renderingContext->_set('viewHelperVariableContainer', $this->viewHelperVariableContainer->reveal());
-        $this->renderingContext->setControllerContext($this->controllerContext);
-        $this->mvcPropertyMapperConfigurationService = $this->getAccessibleMock(\TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService::class, ['dummy']);
-    }
-
-    /**
-     * @param ViewHelperInterface $viewHelper
-     */
-    protected function injectDependenciesIntoViewHelper(ViewHelperInterface $viewHelper)
-    {
-        $viewHelper->setRenderingContext($this->renderingContext);
-        $viewHelper->setArguments($this->arguments);
-        // this condition is needed, because the (Be)/Security\*ViewHelper don't extend the
-        // AbstractViewHelper and contain no method injectReflectionService()
-        if ($viewHelper instanceof AbstractViewHelper) {
-            $reflectionServiceProphecy = $this->prophesize(ReflectionService::class);
-            $viewHelper->injectReflectionService($reflectionServiceProphecy->reveal());
-        }
-    }
-
-    /**
-     * Helper function to merge arguments with default arguments according to their registration
-     * This usually happens in ViewHelperInvoker before the view helper methods are called
-     *
-     * @param ViewHelperInterface $viewHelper
-     * @param array $arguments
-     */
-    protected function setArgumentsUnderTest(ViewHelperInterface $viewHelper, array $arguments = [])
-    {
-        $argumentDefinitions = $viewHelper->prepareArguments();
-        foreach ($argumentDefinitions as $argumentName => $argumentDefinition) {
-            if (!isset($arguments[$argumentName])) {
-                $arguments[$argumentName] = $argumentDefinition->getDefaultValue();
-            }
-        }
-        $viewHelper->setArguments($arguments);
-    }
-
-    /**
-     * Helper function for a valid mapping result
-     */
-    protected function stubRequestWithoutMappingErrors()
-    {
-        $this->request->getOriginalRequest()->willReturn(null);
-        $this->request->getArguments()->willReturn([]);
-        $result = $this->prophesize(Result::class);
-        $result->forProperty('objectName')->willReturn($result->reveal());
-        $result->forProperty('someProperty')->willReturn($result->reveal());
-        $result->hasErrors()->willReturn(false);
-        $this->request->getOriginalRequestMappingResults()->willReturn($result->reveal());
-    }
-
-    /**
-     * Helper function for a mapping result with errors
-     */
-    protected function stubRequestWithMappingErrors()
-    {
-        $this->request->getOriginalRequest()->willReturn(null);
-        $this->request->getArguments()->willReturn([]);
-        $result = $this->prophesize(Result::class);
-        $result->forProperty('objectName')->willReturn($result->reveal());
-        $result->forProperty('someProperty')->willReturn($result->reveal());
-        $result->hasErrors()->willReturn(true);
-        $this->request->getOriginalRequestMappingResults()->willReturn($result->reveal());
-    }
-
-    /**
-     * Helper function for the bound property
-     *
-     * @param $formObject
-     */
-    protected function stubVariableContainer($formObject)
-    {
-        $this->viewHelperVariableContainer->exists(Argument::cetera())->willReturn(true);
-        $this->viewHelperVariableContainer->get(Argument::any(),
-            'formObjectName')->willReturn('objectName');
-        $this->viewHelperVariableContainer->get(Argument::any(),
-            'fieldNamePrefix')->willReturn('fieldPrefix');
-        $this->viewHelperVariableContainer->get(Argument::any(), 'formFieldNames')->willReturn([]);
-        $this->viewHelperVariableContainer->get(Argument::any(),
-            'formObject')->willReturn($formObject);
-        $this->viewHelperVariableContainer->get(Argument::any(),
-            'renderedHiddenFields')->willReturn([]);
-        $this->viewHelperVariableContainer->addOrUpdate(Argument::cetera())->willReturn(null);
-    }
-}
diff --git a/components/testing_framework/Migrations/Code/ClassAliasMap.php b/components/testing_framework/Migrations/Code/ClassAliasMap.php
deleted file mode 100644 (file)
index 99c3a45..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-<?php
-
-return [
-    // Acceptance
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Acceptance\\Step\\Backend\\Admin' => \TYPO3\TestingFramework\Core\Acceptance\Step\Backend\Admin::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Acceptance\\Step\\Backend\\Editor' => \TYPO3\TestingFramework\Core\Acceptance\Step\Backend\Editor::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Acceptance\\Support\\Helper\\ModalDialog' => \TYPO3\TestingFramework\Core\Acceptance\Support\Helper\ModalDialog::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Acceptance\\Support\\Helper\\Topbar' => \TYPO3\TestingFramework\Core\Acceptance\Support\Helper\Topbar::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Acceptance\\Support\\Page\\PageTree' => \TYPO3\TestingFramework\Core\Acceptance\Support\Page\PageTree::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Acceptance\\AcceptanceCoreEnvironment' => \TYPO3\TestingFramework\Core\Acceptance\AcceptanceCoreEnvironment::class,
-
-    // Functional
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Functional\\FunctionalTestCase' => \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\Frontend\\Hook\\BackendUserHandler' => \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Hook\BackendUserHandler::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\Frontend\\Collector' => \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Collector::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\Frontend\\Hook\\FrontendUserHandler' => \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Hook\FrontendUserHandler::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\Frontend\\Parser' => \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Parser::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\Frontend\\Renderer' => \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\Renderer::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\Frontend\\RequestBootstrap' => \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\RequestBootstrap::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\Frontend\\ResponseContent' => \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseContent::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Functional\\Framework\Frontend\\ResponseSection' => \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\ResponseSection::class,
-
-    // Unit
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Unit\\UnitTestCase' => \TYPO3\TestingFramework\Core\Unit\UnitTestCase::class,
-
-    // General
-    '\\TYPO3\\Components\\TestingFramework\\Core\\AccessibleObjectInterface' => \TYPO3\TestingFramework\Core\AccessibleObjectInterface::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\BaseTestCase' => \TYPO3\TestingFramework\Core\BaseTestCase::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Exception' => \TYPO3\TestingFramework\Core\Exception::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\FileStreamWrapper' => \TYPO3\TestingFramework\Core\FileStreamWrapper::class,
-    '\\TYPO3\\Components\\TestingFramework\\Core\\Testbase' => \TYPO3\TestingFramework\Core\Testbase::class,
-
-    // Fluid
-    '\\TYPO3\\Components\\TestingFramework\\Fluid\\Unit\\ViewHelpers\\ViewHelperBaseTestcase' => \TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase::class
-
-];
diff --git a/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_groups.xml b/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_groups.xml
deleted file mode 100644 (file)
index 7394d26..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-       <be_groups>
-               <uid>1</uid>
-               <pid>0</pid>
-               <tstamp>1452959228</tstamp>
-               <title>editor-group</title>
-               <tables_modify>pages</tables_modify>
-               <crdate>1452959228</crdate>
-               <cruser_id>1</cruser_id>
-       </be_groups>
-</dataset>
diff --git a/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_sessions.xml b/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_sessions.xml
deleted file mode 100644 (file)
index e744814..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-       <be_sessions>
-               <ses_id>886526ce72b86870739cc41991144ec1</ses_id>
-               <ses_iplock>[DISABLED]</ses_iplock>
-               <ses_userid>1</ses_userid>
-               <ses_tstamp>1777777777</ses_tstamp>
-               <ses_data></ses_data>
-               <ses_backuserid>0</ses_backuserid>
-       </be_sessions>
-       <be_sessions>
-               <ses_id>ff83dfd81e20b34c27d3e97771a4525a</ses_id>
-               <ses_iplock>[DISABLED]</ses_iplock>
-               <ses_userid>2</ses_userid>
-               <ses_tstamp>1777777777</ses_tstamp>
-               <ses_data></ses_data>
-               <ses_backuserid>0</ses_backuserid>
-       </be_sessions>
-</dataset>
diff --git a/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_users.xml b/components/testing_framework/Resources/Core/Acceptance/Fixtures/be_users.xml
deleted file mode 100644 (file)
index c386c25..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-       <be_users>
-               <uid>1</uid>
-               <pid>0</pid>
-               <tstamp>1366642540</tstamp>
-               <username>admin</username>
-               <password>$1$tCrlLajZ$C0sikFQQ3SWaFAZ1Me0Z/1</password> <!-- password -->
-               <admin>1</admin>
-               <disable>0</disable>
-               <starttime>0</starttime>
-               <endtime>0</endtime>
-               <options>0</options>
-               <crdate>1366642540</crdate>
-               <cruser_id>0</cruser_id>
-               <workspace_perms>1</workspace_perms>
-               <disableIPlock>1</disableIPlock>
-               <deleted>0</deleted>
-               <TSconfig>NULL</TSconfig>
-               <lastlogin>1371033743</lastlogin>
-               <createdByAction>0</createdByAction>
-               <workspace_id>0</workspace_id>
-               <workspace_preview>1</workspace_preview>
-       </be_users>
-       <be_users>
-               <uid>2</uid>
-               <pid>0</pid>
-               <tstamp>1452944912</tstamp>
-               <username>editor</username>
-               <password>$1$tCrlLajZ$C0sikFQQ3SWaFAZ1Me0Z/1</password> <!-- password -->
-               <admin>0</admin>
-               <disable>0</disable>
-               <starttime>0</starttime>
-               <endtime>0</endtime>
-               <options>0</options>
-               <crdate>1452944912</crdate>
-               <cruser_id>1</cruser_id>
-               <workspace_perms>1</workspace_perms>
-               <disableIPlock>1</disableIPlock>
-               <deleted>0</deleted>
-               <TSconfig>NULL</TSconfig>
-               <lastlogin>1452944915</lastlogin>
-               <createdByAction>0</createdByAction>
-               <workspace_id>0</workspace_id>
-               <workspace_preview>1</workspace_preview>
-               <db_mountpoints>1</db_mountpoints>
-               <usergroup>1</usergroup>
-       </be_users>
-</dataset>
diff --git a/components/testing_framework/Resources/Core/Acceptance/Fixtures/sys_category.xml b/components/testing_framework/Resources/Core/Acceptance/Fixtures/sys_category.xml
deleted file mode 100644 (file)
index 2c2e37d..0000000
+++ /dev/null
@@ -1,120 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-    <sys_category>
-        <uid>1</uid>
-        <pid>0</pid>
-        <title>level-1-1</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>2</uid>
-        <parent>1</parent>
-        <pid>0</pid>
-        <title>level-1-1-1</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>3</uid>
-        <parent>2</parent>
-        <pid>0</pid>
-        <title>level-1-1-1-1</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>4</uid>
-        <parent>2</parent>
-        <pid>0</pid>
-        <title>level-1-1-1-2</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>5</uid>
-        <parent>2</parent>
-        <pid>0</pid>
-        <title>level-1-1-1-3</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>6</uid>
-        <parent>3</parent>
-        <pid>0</pid>
-        <title>level-1-1-1-1-1</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>7</uid>
-        <parent>3</parent>
-        <pid>0</pid>
-        <title>level-1-1-1-1-2</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>8</uid>
-        <pid>0</pid>
-        <title>level-1-2</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>9</uid>
-        <parent>8</parent>
-        <pid>0</pid>
-        <title>level-1-2-1</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>10</uid>
-        <parent>8</parent>
-        <pid>0</pid>
-        <title>level-1-2-2</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>11</uid>
-        <parent>8</parent>
-        <pid>0</pid>
-        <title>level-1-2-3</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>12</uid>
-        <parent>8</parent>
-        <pid>0</pid>
-        <title>level-1-2-4</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>13</uid>
-        <parent>8</parent>
-        <pid>0</pid>
-        <title>level-1-2-5</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>14</uid>
-        <parent>8</parent>
-        <pid>0</pid>
-        <title>level-1-2-6</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-    <sys_category>
-        <uid>15</uid>
-        <pid>0</pid>
-        <title>level-1-3</title>
-        <deleted>0</deleted>
-        <l10n_diffsource/>
-    </sys_category>
-</dataset>
diff --git a/components/testing_framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_extension.xml b/components/testing_framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_extension.xml
deleted file mode 100644 (file)
index fe10af6..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-    <tx_extensionmanager_domain_model_extension>
-        <uid>1</uid>
-        <pid>0</pid>
-        <extension_key>superext</extension_key>
-        <repository>1</repository>
-        <version>1.0.0</version>
-        <alldownloadcounter>1</alldownloadcounter>
-        <downloadcounter>0</downloadcounter>
-        <title>Super extension</title>
-        <description>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam</description>
-        <state>2</state>
-        <review_state>0</review_state>
-        <category>2</category>
-        <last_updated>1474625908</last_updated>
-        <serialized_dependencies>a:1:{s:7:&quot;depends&quot;;a:1:{s:5:&quot;typo3&quot;;s:12:&quot;7.6.0-8.9.99&quot;;}}</serialized_dependencies>
-        <author_name>John Doe</author_name>
-        <author_email>john@doe.com</author_email>
-        <ownerusername>jdoe</ownerusername>
-        <md5hash>fa061138fc220bdfe5c631ba019f9f84</md5hash>
-        <update_comment> Update comment</update_comment>
-        <authorcompany></authorcompany>
-        <integer_version>1000000</integer_version>
-        <current_version>1</current_version>
-        <lastreviewedversion>0</lastreviewedversion>
-    </tx_extensionmanager_domain_model_extension>
-    <tx_extensionmanager_domain_model_extension>
-        <uid>2</uid>
-        <pid>0</pid>
-        <extension_key>neededext</extension_key>
-        <repository>1</repository>
-        <version>2.0.0</version>
-        <alldownloadcounter>2</alldownloadcounter>
-        <downloadcounter>0</downloadcounter>
-        <title>Needed Extension</title>
-        <description>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut</description>
-        <state>2</state>
-        <review_state>0</review_state>
-        <category>5</category>
-        <last_updated>1474977787</last_updated>
-        <serialized_dependencies>a:1:{s:7:&quot;depends&quot;;a:3:{s:5:&quot;typo3&quot;;s:13:&quot;6.2.0-8.4.999&quot;;s:3:&quot;php&quot;;s:13:&quot;5.4.0-7.0.999&quot;;s:9:&quot;scheduler&quot;;s:13:&quot;6.2.0-8.4.999&quot;;}}</serialized_dependencies>
-        <author_name>Dmitry Dulepov</author_name>
-        <author_email>dmitry.dulepov@gmail.com</author_email>
-        <ownerusername>dmitry</ownerusername>
-        <md5hash>b28075aa867d17cc97c7acfe187a71d1</md5hash>
-        <update_comment>no comment</update_comment>
-        <authorcompany></authorcompany>
-        <integer_version>2000000</integer_version>
-        <current_version>1</current_version>
-        <lastreviewedversion>0</lastreviewedversion>
-    </tx_extensionmanager_domain_model_extension>
-
-</dataset>
diff --git a/components/testing_framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_repository.xml b/components/testing_framework/Resources/Core/Acceptance/Fixtures/tx_extensionmanager_domain_model_repository.xml
deleted file mode 100644 (file)
index 07e8491..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-    <tx_extensionmanager_domain_model_repository>
-        <pid>0</pid>
-        <title>TYPO3.org Main Repository</title>
-        <description>Main repository on typo3.org. This repository has some mirrors configured which are available with
-            the mirror url.
-        </description>
-        <wsdl_url>https://typo3.org/wsdl/tx_ter_wsdl.php</wsdl_url>
-        <mirror_list_url>https://repositories.typo3.org/mirrors.xml.gz</mirror_list_url>
-        <last_update>1477500928</last_update>
-        <extension_count>2</extension_count>
-    </tx_extensionmanager_domain_model_repository>
-</dataset>
diff --git a/components/testing_framework/Resources/Core/Build/AcceptanceTests.yml b/components/testing_framework/Resources/Core/Build/AcceptanceTests.yml
deleted file mode 100644 (file)
index 616c098..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-actor: Tester
-paths:
-# @todo clean up here: https://forge.typo3.org/issues/79097 
-  tests: ../../../../../typo3/sysext/core/Tests
-  log: ../../../../../typo3temp/var/tests/AcceptanceReports
-  data: Configuration/Acceptance/Data
-  support: Configuration/Acceptance/Support
-  envs: Configuration/Acceptance/Envs
-settings:
-  colors: true
-  memory_limit: 1024M
-extensions:
-  enabled:
-    - Codeception\Extension\RunFailed
-    - Codeception\Extension\Recorder
-    - TYPO3\TestingFramework\Core\Acceptance\AcceptanceCoreEnvironment
-groups:
-  AcceptanceTests-Job-*: Configuration/Acceptance/AcceptanceTests-Job-*
-
diff --git a/components/testing_framework/Resources/Core/Build/Configuration/Acceptance/Support/AcceptanceTester.php b/components/testing_framework/Resources/Core/Build/Configuration/Acceptance/Support/AcceptanceTester.php
deleted file mode 100644 (file)
index 54392ce..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-<?php
-
-
-/**
- * Inherited Methods
- * @method void wantToTest($text)
- * @method void wantTo($text)
- * @method void execute($callable)
- * @method void expectTo($prediction)
- * @method void expect($prediction)
- * @method void amGoingTo($argumentation)
- * @method void am($role)
- * @method void lookForwardTo($achieveValue)
- * @method void comment($description)
- * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = null)
- *
- * @SuppressWarnings(PHPMD)
-*/
-class AcceptanceTester extends \Codeception\Actor
-{
-    use _generated\AcceptanceTesterActions;
-
-    /**
-     * The session cookie that is used if the session is injected.
-     * This session must exist in the database fixture to get a logged in state.
-     *
-     * @var string
-     */
-    protected $sessionCookie = '';
-
-    /**
-     * Use the existing database session from the fixture by setting the backend user cookie
-     */
-    public function useExistingSession()
-    {
-        $I = $this;
-        $I->amOnPage('/typo3/index.php');
-
-        // @todo: There is a bug in PhantomJS / firefox (?) where adding a cookie fails.
-        // This bug will be fixed in the next PhantomJS version but i also found
-        // this workaround. First reset / delete the cookie and than set it and catch
-        // the webdriver exception as the cookie has been set successful.
-        try {
-            $I->resetCookie('be_typo_user');
-            $I->setCookie('be_typo_user', $this->sessionCookie);
-        } catch (\Facebook\WebDriver\Exception\UnableToSetCookieException $e) {
-        }
-        try {
-            $I->resetCookie('be_lastLoginProvider');
-            $I->setCookie('be_lastLoginProvider', '1433416747');
-        } catch (\Facebook\WebDriver\Exception\UnableToSetCookieException $e) {
-        }
-
-        // reload the page to have a logged in backend
-        $I->amOnPage('/typo3/index.php');
-    }
-}
diff --git a/components/testing_framework/Resources/Core/Build/Configuration/Acceptance/Support/Helper/Acceptance.php b/components/testing_framework/Resources/Core/Build/Configuration/Acceptance/Support/Helper/Acceptance.php
deleted file mode 100644 (file)
index bde9b7b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-<?php
-namespace Helper;
-
-class Acceptance extends \Codeception\Module
-{
-}
diff --git a/components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Bootstrap.js b/components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Bootstrap.js
deleted file mode 100644 (file)
index c7d38a8..0000000
+++ /dev/null
@@ -1,86 +0,0 @@
-'use strict';
-
-var tests = [];
-var paths = {
-       'jquery-ui': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery-ui',
-       'datatables': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery.dataTables',
-       'matchheight': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery.matchHeight-min',
-       'nprogress': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/nprogress',
-       'moment': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/moment',
-       'cropper': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/cropper.min',
-       'imagesloaded': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/imagesloaded.pkgd.min',
-       'bootstrap': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/bootstrap/bootstrap',
-       'twbs/bootstrap-datetimepicker': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/bootstrap-datetimepicker',
-       'autosize': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/autosize',
-       'taboverride': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/taboverride.min',
-       'twbs/bootstrap-slider': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/bootstrap-slider.min',
-       'jquery/autocomplete': '/base/typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery.autocomplete'
-};
-
-/**
- * Collect test files and define namespace mapping for RequireJS config
- */
-for (var file in window.__karma__.files) {
-       if (window.__karma__.files.hasOwnProperty(file)) {
-               // Add dynamic path mapping for requirejs config
-               if (/Resources\/Public\/JavaScript\//.test(file)) {
-                       var parts = file.split('/');
-                       var extkey = parts[4];
-                       var extname = extkey.replace(/_([a-z])/g, function(g) {
-                               return g[1].toUpperCase();
-                       });
-                       extname = extname.charAt(0).toUpperCase() + extname.slice(1);
-                       var namespace = 'TYPO3/CMS/' + extname;
-                       if (typeof paths[namespace] === 'undefined') {
-                               paths[namespace] = '/base/typo3/sysext/' + extkey + '/Resources/Public/JavaScript';
-                       }
-               }
-               // Find all test files
-               var testFilePattern = /Tests\/JavaScript\/(.*)Test\.js$/gi;
-               if (testFilePattern.test(file)) {
-                       tests.push(file);
-               }
-       }
-}
-
-/**
- * Define environment
- * Set global objects and variables
- * @TODO: hopefully we can cleanup the following lines in future
- */
-if (typeof TYPO3 === 'undefined') {
-       var TYPO3 = TYPO3 || {};
-       TYPO3.jQuery = jQuery.noConflict(true);
-       TYPO3.settings = {
-               'FormEngine': {
-                       'formName': 'Test'
-               },
-               'DateTimePicker': {
-                       'DateFormat': 'd.m.Y'
-               },
-               'ajaxUrls': {
-               }
-       };
-       TYPO3.lang = {};
-}
-
-top.TYPO3 = TYPO3;
-var TBE_EDITOR = {};
-
-/**
- * RequireJS setup
- */
-requirejs.config({
-       // Karma serves files from '/base'
-       baseUrl: '/base',
-
-       paths: paths,
-
-       shim: {},
-
-       // ask Require.js to load these files (all our tests)
-       deps: tests,
-
-       // start test run, once Require.js is done
-       callback: window.__karma__.start
-});
diff --git a/components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Helper.js b/components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Helper.js
deleted file mode 100644 (file)
index d8f7685..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-'use strict';
-
-/**
- * Helper function to implement DataProvider
- * @param {Function|Array|Object} values
- * @param {Function} func
- */
-function using(values, func) {
-       if (values instanceof Function) {
-               values = values();
-       }
-
-       if (values instanceof Array) {
-               values.forEach(function(value) {
-                       if (!(value instanceof Array)) {
-                               value = [value];
-                       }
-
-                       func.apply(this, value);
-               });
-       } else {
-               var objectKeys = Object.keys(values);
-
-               objectKeys.forEach(function(key) {
-                       if (!(values[key] instanceof Array)) {
-                               values[key] = [values[key]];
-                       }
-
-                       values[key].push(key);
-
-                       func.apply(this, values[key]);
-               });
-       }
-}
diff --git a/components/testing_framework/Resources/Core/Build/Configuration/JSUnit/karma.conf.js b/components/testing_framework/Resources/Core/Build/Configuration/JSUnit/karma.conf.js
deleted file mode 100644 (file)
index aa4f4ed..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-'use strict';
-
-/**
- * Karma configuration
- */
-
-module.exports = function(config) {
-       config.set({
-               // base path that will be used to resolve all patterns (eg. files, exclude)
-               basePath: '../../../../../../../',
-
-               // frameworks to use
-               // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
-               frameworks: ['jasmine', 'requirejs'],
-
-               // list of files / patterns to load in the browser
-               files: [
-                       { pattern: 'typo3/sysext/core/Resources/Public/JavaScript/Contrib/jquery/jquery-3.2.1.js', included: true },
-                       { pattern: 'typo3/sysext/**/Resources/Public/JavaScript/**/*.js', included: false },
-                       { pattern: 'typo3/sysext/**/Tests/JavaScript/**/*.js', included: false },
-                       'components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Helper.js',
-                       'components/testing_framework/Resources/Core/Build/Configuration/JSUnit/Bootstrap.js'
-               ],
-
-               // list of files to exclude
-               exclude: [
-               ],
-
-               // preprocess matching files before serving them to the browser
-               // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
-               preprocessors: {
-                       'typo3/sysext/**/Resources/Public/JavaScript/**/*.js': ['coverage']
-               },
-
-               // test results reporter to use
-               // possible values: 'dots', 'progress', 'coverage', 'junit'
-               // available reporters: https://npmjs.org/browse/keyword/karma-reporter
-               reporters: ['progress', 'junit', 'coverage'],
-
-               junitReporter: {
-                       outputDir: 'typo3temp/var/tests/',
-                       useBrowserName: false,
-                       outputFile: 'karma.junit.xml'
-               },
-
-               coverageReporter: {
-                       reporters: [
-                               {type: 'clover', dir: 'typo3temp', subdir: 'var/tests', file: 'karma.clover.xml'}
-                       ]
-               },
-
-               // web server port
-               port: 9876,
-
-               // enable / disable colors in the output (reporters and logs)
-               colors: true,
-
-               // level of logging
-               // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
-               logLevel: config.LOG_INFO,
-
-               // enable / disable watching file and executing tests whenever any file changes
-               autoWatch: true,
-
-               // start these browsers
-               // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
-               // browsers: ['Firefox', 'Chrome', 'Safari', 'PhantomJS', 'Opera', 'IE'],
-               browsers: ['PhantomJS'],
-
-               // Continuous Integration mode
-               // if true, Karma captures browsers, runs the tests and exits
-               singleRun: false,
-
-               // Concurrency level
-               // how many browser should be started simultaneous
-               concurrency: Infinity
-       })
-};
diff --git a/components/testing_framework/Resources/Core/Build/FunctionalTests.xml b/components/testing_framework/Resources/Core/Build/FunctionalTests.xml
deleted file mode 100644 (file)
index 0e21592..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<!--
-       Functional test suites setup
-
-       Functional tests should extend from \TYPO3\TestingFramework\Core\Tests\FunctionalTestCase,
-       take a look at this class for further documentation on how to run the suite.
-
-       TYPO3 CMS functional test suite also needs phpunit bootstrap code, the
-       file is located next to this .xml as FunctionalTestsBootstrap.php
--->
-<phpunit
-       backupGlobals="true"
-       backupStaticAttributes="false"
-       bootstrap="FunctionalTestsBootstrap.php"
-       colors="true"
-       convertErrorsToExceptions="true"
-       convertWarningsToExceptions="true"
-       forceCoversAnnotation="false"
-       processIsolation="true"
-       stopOnError="false"
-       stopOnFailure="false"
-       stopOnIncomplete="false"
-       stopOnSkipped="false"
-       verbose="false"
->
-       <testsuites>
-               <testsuite name="Core tests">
-                       <directory>../../../../../typo3/sysext/*/Tests/Functional/</directory>
-               </testsuite>
-       </testsuites>
-</phpunit>
diff --git a/components/testing_framework/Resources/Core/Build/FunctionalTestsBootstrap.php b/components/testing_framework/Resources/Core/Build/FunctionalTestsBootstrap.php
deleted file mode 100644 (file)
index c6ae5b8..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * This file is defined in FunctionalTests.xml and called by phpunit
- * before instantiating the test suites, it must also be included
- * with phpunit parameter --bootstrap if executing single test case classes.
- */
-call_user_func(function () {
-    $testbase = new \TYPO3\TestingFramework\Core\Testbase();
-    $testbase->enableDisplayErrors();
-    $testbase->defineBaseConstants();
-    $testbase->defineOriginalRootPath();
-    $testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/tests');
-    $testbase->createDirectory(ORIGINAL_ROOT . 'typo3temp/var/transient');
-});
diff --git a/components/testing_framework/Resources/Core/Build/Scripts/splitAcceptanceTests.sh b/components/testing_framework/Resources/Core/Build/Scripts/splitAcceptanceTests.sh
deleted file mode 100755 (executable)
index e7b51f7..0000000
+++ /dev/null
@@ -1,95 +0,0 @@
-#!/bin/bash
-
-#########################
-#
-# This file is typically executed by bamboo, but could be
-# used locally, too.
-#
-# It expects to be run from the core root.
-#
-# ./components/testing_framework/core/Build/Scripts/splitAcceptanceTests.sh <numberOfConfigs>
-#
-# The script finds all acceptance tests and creates <numberOfConfigs> number
-# of codeception group files, each containing a sub set of Cest files to execute.
-#
-# components/testing_framework/Resources/Core/Build/Configuration/Acceptance/AcceptanceTests-Job-<counter>
-#
-# Those sub-groups can then be executed with a command like (example for files in group 2 here)
-# ./bin/codecept run Acceptance -d -g AcceptanceTests-Job-2 -c components/testing_framework/Resources/Core/Build/AcceptanceTests.yml
-#
-#########################
-
-numberOfAcceptanceTestJobs=${1}
-
-# Have a dir for temp files and clean up possibly existing stuff
-if [ ! -d buildTemp ]; then
-       mkdir buildTemp || exit 1
-fi
-if [ -f buildTemp/testFiles.txt ]; then
-       rm buildTemp/testFiles.txt
-fi
-if [ -f buildTemp/testFilesWithNumberOfTestFiles.txt ]; then
-       rm buildTemp/testFilesWithNumberOfTestFiles.txt
-fi
-if [ -f buildTemp/testFilesWeighted.txt ]; then
-       rm buildTemp/testFilesWeighted.txt
-fi
-
-# A list of all acceptance test files
-find . -name \*Cest.php -path \*typo3/sysext/*/Tests/Acceptance* > buildTemp/testFiles.txt
-
-# File with test files of format "42 ./path/to/file"
-while read testFile; do
-       numberOfTestsInTestFile=`grep "public function [^\_].*" ${testFile} | wc -l`
-       echo "${numberOfTestsInTestFile} ${testFile}" >> buildTemp/testFilesWithNumberOfTestFiles.txt
-done < buildTemp/testFiles.txt
-
-# Sort list of files numeric
-cat buildTemp/testFilesWithNumberOfTestFiles.txt | sort -n -r > buildTemp/testFilesWeighted.txt
-
-groupFilePath="components/testing_framework/Resources/Core/Build/Configuration/Acceptance"
-# Config file boilerplate per job
-for (( i=1; i<=${numberOfAcceptanceTestJobs}; i++)); do
-       if [ -f ${groupFilePath}/AcceptanceTests-Job-${i} ]; then
-               rm ${groupFilePath}/AcceptanceTests-Job-${i}
-       fi
-       touch ${groupFilePath}/AcceptanceTests-Job-${i}
-done
-
-counter=0
-direction=ascending
-while read testFileWeighted; do
-       # test file only, without leading ./
-       testFile=`echo ${testFileWeighted} | cut -f2 -d" " | cut -f2-40 -d"/"`
-
-       # Goal: with 3 jobs, have:
-       # file #0 to job #0 (asc)
-       # file #1 to job #1 (asc)
-       # file #2 to job #2 (asc)
-       # file #3 to job #2 (desc)
-       # file #4 to job #1 (desc)
-       # file #5 to job #0 (desc)
-       # file #6 to job #0 (asc)
-       # ...
-       testFileModuleNumberOfJobs=$(( counter % numberOfAcceptanceTestJobs ))
-       if [[ ${direction} == "descending" ]]; then
-               targetJobNumberForFile=$(( numberOfAcceptanceTestJobs - testFileModuleNumberOfJobs))
-       else
-               targetJobNumberForFile=${testFileModuleNumberOfJobs}
-       fi
-       if [ ${testFileModuleNumberOfJobs} -eq ${numberOfAcceptanceTestJobs} ]; then
-               if [[ ${direction} == "descending" ]]; then
-                       direction=ascending
-               else
-                       direction=descending
-               fi
-       fi
-       echo "../../../../../${testFile}" >> ${groupFilePath}/AcceptanceTests-Job-$(( targetJobNumberForFile + 1 ))
-       (( counter ++ ))
-done < buildTemp/testFilesWeighted.txt
-
-# Clean up
-rm buildTemp/testFiles.txt
-rm buildTemp/testFilesWeighted.txt
-rm buildTemp/testFilesWithNumberOfTestFiles.txt
-rmdir buildTemp
diff --git a/components/testing_framework/Resources/Core/Build/Scripts/splitFunctionalTests.sh b/components/testing_framework/Resources/Core/Build/Scripts/splitFunctionalTests.sh
deleted file mode 100755 (executable)
index febbf65..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-#!/bin/bash
-
-#########################
-#
-# This file is typically executed by travis and / or bamboo.
-# It expects to be run from the core root.
-#
-# ./components/testing_framework/core/Build/Scripts/splitFunctionalTests.sh <numberOfConfigs>
-#
-# The scripts finds all functional tests and creates <numberOfConfigs> number
-# of phpunit .xml configuration files where each configuration lists a weighted
-# number of single functional tests.
-#
-# components/testing_framework/core/Build/FunctionalTests-Job-<counter>.xml
-#
-#########################
-
-numberOfFunctionalTestJobs=${1}
-numberOfFunctionalTestJobsMinusOne=$(( numberOfFunctionalTestJobs - 1 ))
-
-# Have a dir for temp files and clean up possibly existing stuff
-if [ ! -d buildTemp ]; then
-       mkdir buildTemp || exit 1
-fi
-if [ -f buildTemp/testFiles.txt ]; then
-       rm buildTemp/testFiles.txt
-fi
-if [ -f buildTemp/testFilesWithNumberOfTestFiles.txt ]; then
-       rm buildTemp/testFilesWithNumberOfTestFiles.txt
-fi
-if [ -f buildTemp/testFilesWeighted.txt ]; then
-       rm buildTemp/testFilesWeighted.txt
-fi
-
-# A list of all functional test files
-find . -name \*Test.php -path \*typo3/sysext/*/Tests/Functional* > buildTemp/testFiles.txt
-
-# File with test files of format "42 ./path/to/file"
-while read testFile; do
-       numberOfTestsInTestFile=`grep "@test" ${testFile} | wc -l`
-       echo "${numberOfTestsInTestFile} ${testFile}" >> buildTemp/testFilesWithNumberOfTestFiles.txt
-done < buildTemp/testFiles.txt
-
-# Sort list of files numeric
-cat buildTemp/testFilesWithNumberOfTestFiles.txt | sort -n -r > buildTemp/testFilesWeighted.txt
-
-# Config file boilerplate per job
-for (( i=0; i<${numberOfFunctionalTestJobs}; i++)); do
-       if [ -f components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml ]; then
-               rm components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       fi
-       echo '<phpunit' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  backupGlobals="true"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  backupStaticAttributes="false"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  bootstrap="FunctionalTestsBootstrap.php"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  colors="true"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  convertErrorsToExceptions="true"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  convertWarningsToExceptions="true"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  forceCoversAnnotation="false"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  processIsolation="true"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  stopOnError="false"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  stopOnFailure="false"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  stopOnIncomplete="false"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  stopOnSkipped="false"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  verbose="false"' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '>' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  <testsuites>' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '          <testsuite name="Core tests">' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-done
-
-counter=0
-direction=ascending
-while read testFileWeighted; do
-       # test file only, without leading ./
-       testFile=`echo ${testFileWeighted} | cut -f2 -d" " | cut -f2-40 -d"/"`
-
-       # Goal: with 3 jobs, have:
-       # file #0 to job #0 (asc)
-       # file #1 to job #1 (asc)
-       # file #2 to job #2 (asc)
-       # file #3 to job #2 (desc)
-       # file #4 to job #1 (desc)
-       # file #5 to job #0 (desc)
-       # file #6 to job #0 (asc)
-       # ...
-       testFileModuleNumberOfJobs=$(( counter % numberOfFunctionalTestJobs ))
-       if [[ ${direction} == "descending" ]]; then
-               targetJobNumberForFile=$(( numberOfFunctionalTestJobs - testFileModuleNumberOfJobs))
-       else
-               targetJobNumberForFile=${testFileModuleNumberOfJobs}
-       fi
-       if [ ${testFileModuleNumberOfJobs} -eq ${numberOfFunctionalTestJobs} ]; then
-               if [[ ${direction} == "descending" ]]; then
-                       direction=ascending
-               else
-                       direction=descending
-               fi
-       fi
-
-       echo '                  <directory>' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${targetJobNumberForFile}.xml
-       echo "                          ../../../../../${testFile}" >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${targetJobNumberForFile}.xml
-       echo '                  </directory>' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${targetJobNumberForFile}.xml
-       (( counter ++ ))
-done < buildTemp/testFilesWeighted.txt
-
-# Final part of config file
-for (( i=0; i<${numberOfFunctionalTestJobs}; i++)); do
-       echo '          </testsuite>' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '  </testsuites>' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-       echo '</phpunit>' >> components/testing_framework/Resources/Core/Build/FunctionalTests-Job-${i}.xml
-done
-
-# Clean up
-rm buildTemp/testFiles.txt
-rm buildTemp/testFilesWeighted.txt
-rm buildTemp/testFilesWithNumberOfTestFiles.txt
-rmdir buildTemp
diff --git a/components/testing_framework/Resources/Core/Build/UnitTests.xml b/components/testing_framework/Resources/Core/Build/UnitTests.xml
deleted file mode 100644 (file)
index 4b231eb..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<phpunit
-       backupGlobals="true"
-       backupStaticAttributes="false"
-       bootstrap="UnitTestsBootstrap.php"
-       colors="true"
-       convertErrorsToExceptions="true"
-       convertWarningsToExceptions="true"
-       forceCoversAnnotation="false"
-       processIsolation="false"
-       stopOnError="false"
-       stopOnFailure="false"
-       stopOnIncomplete="false"
-       stopOnSkipped="false"
-       verbose="false"
->
-       <testsuites>
-               <testsuite name="Core tests">
-                       <directory>../../../../../typo3/sysext/*/Tests/Unit/</directory>
-               </testsuite>
-               <testsuite name="Core legacy tests">
-                       <directory>../../../../../typo3/sysext/core/Tests/Legacy/</directory>
-               </testsuite>
-               <testsuite name="Suite integrity tests">
-                       <directory>../../../../../typo3/sysext/core/Tests/Integrity/</directory>
-               </testsuite>
-       </testsuites>
-</phpunit>
diff --git a/components/testing_framework/Resources/Core/Build/UnitTestsBootstrap.php b/components/testing_framework/Resources/Core/Build/UnitTestsBootstrap.php
deleted file mode 100644 (file)
index 5fb2181..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-<?php
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * This file is defined in UnitTests.xml and called by phpunit
- * before instantiating the test suites, it must also be included
- * with phpunit parameter --bootstrap if executing single test case classes.
- *
- * Run whole core unit test suite, example:
- * - cd /var/www/t3master/foo  # Document root of TYPO3 CMS instance (location of index.php)
- * - typo3/../bin/phpunit -c components/testing_framework/core/Build/UnitTests.xml
- *
- * Run single test case, example:
- * - cd /var/www/t3master/foo  # Document root of TYPO3 CMS instance (location of index.php)
- * - typo3/../bin/phpunit -c components/testing_framework/core/Build/UnitTests.xml
- *     typo3/sysext/core/Tests/Unit/DataHandling/DataHandlerTest.php
- */
-call_user_func(function () {
-    $testbase = new \TYPO3\TestingFramework\Core\Testbase();
-    $testbase->enableDisplayErrors();
-    $testbase->defineBaseConstants();
-    $testbase->defineSitePath();
-    $testbase->defineTypo3ModeBe();
-    $testbase->setTypo3TestingContext();
-    $testbase->createDirectory(PATH_site . 'typo3conf/ext');
-    $testbase->createDirectory(PATH_site . 'typo3temp/assets');
-    $testbase->createDirectory(PATH_site . 'typo3temp/var/tests');
-    $testbase->createDirectory(PATH_site . 'typo3temp/var/transient');
-    $testbase->createDirectory(PATH_site . 'uploads');
-
-    // disable TYPO3_DLOG
-    define('TYPO3_DLOG', false);
-
-    // Retrieve an instance of class loader and inject to core bootstrap
-    $classLoaderFilepath = __DIR__ . '/../../../../../vendor/autoload.php';
-    if (!file_exists($classLoaderFilepath)) {
-        die('ClassLoader can\'t be loaded. Please check your path or set an environment variable \'TYPO3_PATH_ROOT\' to your root path.');
-    }
-    $classLoader = require $classLoaderFilepath;
-    \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
-        ->initializeClassLoader($classLoader)
-        ->setRequestType(TYPO3_REQUESTTYPE_BE | TYPO3_REQUESTTYPE_CLI)
-        ->baseSetup();
-
-    // Initialize default TYPO3_CONF_VARS
-    $configurationManager = new \TYPO3\CMS\Core\Configuration\ConfigurationManager();
-    $GLOBALS['TYPO3_CONF_VARS'] = $configurationManager->getDefaultConfiguration();
-    // Avoid failing tests that rely on HTTP_HOST retrieval
-    $GLOBALS['TYPO3_CONF_VARS']['SYS']['trustedHostsPattern'] = '.*';
-
-    \TYPO3\CMS\Core\Core\Bootstrap::getInstance()
-        ->disableCoreCache()
-        ->initializeCachingFramework()
-        // Set all packages to active
-        ->initializePackageManagement(\TYPO3\CMS\Core\Package\UnitTestPackageManager::class);
-
-    if (!\TYPO3\CMS\Core\Core\Bootstrap::usesComposerClassLoading()) {
-        // Dump autoload info if in non composer mode
-        \TYPO3\CMS\Core\Core\ClassLoadingInformation::dumpClassLoadingInformation();
-        \TYPO3\CMS\Core\Core\ClassLoadingInformation::registerClassLoadingInformation();
-    }
-});
diff --git a/components/testing_framework/Resources/Core/Functional/Fixtures/be_users.xml b/components/testing_framework/Resources/Core/Functional/Fixtures/be_users.xml
deleted file mode 100644 (file)
index 9611be2..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-       <be_users>
-               <uid>1</uid>
-               <pid>0</pid>
-               <tstamp>1366642540</tstamp>
-               <username>admin</username>
-               <password>$1$tCrlLajZ$C0sikFQQ3SWaFAZ1Me0Z/1</password> <!-- password -->
-               <admin>1</admin>
-               <disable>0</disable>
-               <starttime>0</starttime>
-               <endtime>0</endtime>
-               <options>0</options>
-               <crdate>1366642540</crdate>
-               <cruser_id>0</cruser_id>
-               <workspace_perms>1</workspace_perms>
-               <disableIPlock>1</disableIPlock>
-               <deleted>0</deleted>
-               <TSconfig>NULL</TSconfig>
-               <lastlogin>1371033743</lastlogin>
-               <createdByAction>0</createdByAction>
-               <workspace_id>0</workspace_id>
-               <workspace_preview>1</workspace_preview>
-       </be_users>
-</dataset>
\ No newline at end of file
diff --git a/components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml b/components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml
deleted file mode 100644 (file)
index 8766471..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-       <pages>
-               <uid>1</uid>
-               <pid>0</pid>
-               <title>Root</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>2</uid>
-               <pid>1</pid>
-               <title>Dummy 1-2</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>3</uid>
-               <pid>2</pid>
-               <title>Dummy 1-2-3</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>4</uid>
-               <pid>3</pid>
-               <title>Dummy 1-2-3-4</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>5</uid>
-               <pid>1</pid>
-               <title>Dummy 1-5</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>6</uid>
-               <pid>5</pid>
-               <title>Dummy 1-5-6</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>7</uid>
-               <pid>0</pid>
-               <title>Root 2</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-</dataset>
\ No newline at end of file
diff --git a/components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml b/components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml
deleted file mode 100644 (file)
index 68d3bb4..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-       <sys_file_storage>
-               <uid>1</uid>
-               <pid>0</pid>
-               <name>fileadmin/ (auto-created)</name>
-               <processingfolder>typo3temp/assets/_processed_/</processingfolder>
-               <driver>Local</driver>
-               <configuration><![CDATA[<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<T3FlexForms>
-       <data>
-               <sheet index="sDEF">
-                       <language index="lDEF">
-                               <field index="basePath">
-                                       <value index="vDEF">fileadmin/</value>
-                               </field>
-                               <field index="pathType">
-                                       <value index="vDEF">relative</value>
-                               </field>
-                               <field index="caseSensitive">
-                                       <value index="vDEF">1</value>
-                               </field>
-                       </language>
-               </sheet>
-       </data>
-</T3FlexForms>]]></configuration>
-               <is_browsable>1</is_browsable>
-               <is_public>1</is_public>
-               <is_writable>1</is_writable>
-               <is_online>1</is_online>
-       </sys_file_storage>
-</dataset>
\ No newline at end of file
diff --git a/components/testing_framework/Resources/Core/Functional/Fixtures/sys_language.xml b/components/testing_framework/Resources/Core/Functional/Fixtures/sys_language.xml
deleted file mode 100644 (file)
index 73e6b89..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-    <sys_language>
-        <uid>1</uid>
-        <pid>0</pid>
-        <tstamp>1277119475</tstamp>
-        <hidden>0</hidden>
-        <title>Dansk</title>
-        <flag>dk</flag>
-        <static_lang_isocode>0</static_lang_isocode>
-        <language_isocode>dk</language_isocode>
-    </sys_language>
-    <sys_language>
-        <uid>2</uid>
-        <pid>0</pid>
-        <tstamp>1277119475</tstamp>
-        <hidden>0</hidden>
-        <title>Deutsch</title>
-        <flag>de</flag>
-        <static_lang_isocode>0</static_lang_isocode>
-        <language_isocode>de</language_isocode>
-    </sys_language>
-</dataset>
\ No newline at end of file
diff --git a/components/testing_framework/Resources/Core/Functional/Fixtures/tt_content.xml b/components/testing_framework/Resources/Core/Functional/Fixtures/tt_content.xml
deleted file mode 100644 (file)
index 59550e4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-    <tt_content>
-        <uid>1</uid>
-        <pid>1</pid>
-        <CType>header</CType>
-        <header>Test content</header>
-        <deleted>0</deleted>
-        <t3ver_oid>0</t3ver_oid>
-        <t3ver_wsid>0</t3ver_wsid>
-    </tt_content>
-</dataset>
\ No newline at end of file
diff --git a/components/testing_framework/compat/core/AccessibleObjectInterface.php b/components/testing_framework/compat/core/AccessibleObjectInterface.php
deleted file mode 100644 (file)
index 35ea2be..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * @deprecated since TYPO3 8, will be removed in TYPO3 9
- */
-interface AccessibleObjectInterface extends \TYPO3\TestingFramework\Core\AccessibleObjectInterface
-{
-}
diff --git a/components/testing_framework/compat/core/BaseTestCase.php b/components/testing_framework/compat/core/BaseTestCase.php
deleted file mode 100644 (file)
index 73fcfc7..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * @deprecated since TYPO3 8, will be removed in TYPO3 9
- */
-abstract class BaseTestCase extends \TYPO3\TestingFramework\Core\BaseTestCase
-{
-}
diff --git a/components/testing_framework/compat/core/Exception.php b/components/testing_framework/compat/core/Exception.php
deleted file mode 100644 (file)
index fadcf56..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * @deprecated since TYPO3 8, will be removed in TYPO3 9
- */
-class Exception extends \TYPO3\TestingFramework\Core\Exception
-{
-}
diff --git a/components/testing_framework/compat/core/FileStreamWrapper.php b/components/testing_framework/compat/core/FileStreamWrapper.php
deleted file mode 100644 (file)
index 351e765..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * @deprecated since TYPO3 8, will be removed in TYPO3 9
- */
-class FileStreamWrapper extends \TYPO3\TestingFramework\Core\FileStreamWrapper
-{
-}
diff --git a/components/testing_framework/compat/core/FunctionalTestCase.php b/components/testing_framework/compat/core/FunctionalTestCase.php
deleted file mode 100644 (file)
index c252eea..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * @deprecated since TYPO3 8, will be removed in TYPO3 9
- */
-abstract class FunctionalTestCase extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase
-{
-}
diff --git a/components/testing_framework/compat/core/Testbase.php b/components/testing_framework/compat/core/Testbase.php
deleted file mode 100644 (file)
index 603cf2b..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * @deprecated since TYPO3 8, will be removed in TYPO3 9
- */
-class Testbase extends \TYPO3\TestingFramework\Core\Testbase
-{
-}
diff --git a/components/testing_framework/compat/core/UnitTestCase.php b/components/testing_framework/compat/core/UnitTestCase.php
deleted file mode 100644 (file)
index 3cb0cac..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * @deprecated since TYPO3 8, will be removed in TYPO3 9
- */
-abstract class UnitTestCase extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
-{
-}
diff --git a/components/testing_framework/compat/fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php b/components/testing_framework/compat/fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php
deleted file mode 100644 (file)
index 4916741..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
-
-/*
- * This file is part of the TYPO3 CMS project.
- *
- * It is free software; you can redistribute it and/or modify it under
- * the terms of the GNU General Public License, either version 2
- * of the License, or any later version.
- *
- * For the full copyright and license information, please read the
- * LICENSE.txt file that was distributed with this source code.
- *
- * The TYPO3 project - inspiring people to share!
- */
-
-/**
- * @deprecated since TYPO3 8, will be removed in TYPO3 9
- */
-abstract class ViewHelperBaseTestcase extends \TYPO3\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase
-{
-}
diff --git a/components/testing_framework/composer.json b/components/testing_framework/composer.json
deleted file mode 100644 (file)
index c49862d..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-{
-  "name": "typo3/testing-framework",
-  "description": "The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.",
-  "keywords": [
-    "typo3",
-    "testing",
-    "tests"
-  ],
-  "homepage": "https://typo3.org/",
-  "license": "GPL-2.0+",
-  "authors": [
-    {
-      "name": "TYPO3 CMS Core Team",
-      "role": "Developer",
-      "homepage": "https://forge.typo3.org/projects/typo3cms-core"
-    },
-    {
-      "name": "The TYPO3 Community",
-      "role": "Contributor",
-      "homepage": "https://typo3.org/community/"
-    }
-  ],
-  "support": {
-    "general": "https://typo3.org/support/",
-    "issues": "https://forge.typo3.org",
-    "irc": "irc://irc.freenode.net/#typo3-cms",
-    "news": "nntp://lists.typo3.org"
-  },
-  "require": {
-    "phpunit/phpunit": "^5.6",
-    "mikey179/vfsStream": "~1.6.0",
-    "typo3fluid/fluid": "^2.2",
-    "typo3/cms-core": "^8.5",
-    "typo3/cms-backend": "^8.5",
-    "typo3/cms-frontend": "^8.5",
-    "typo3/cms-extbase": "^8.5",
-    "typo3/cms-fluid": "^8.5"
-  },
-  "suggest": {
-    "codeception/codeception": "^2.2",
-    "se/selenium-server-standalone": "~2.53",
-    "typo3/cms-saltedpasswords": "^8.5",
-    "7elix/styleguide": "~8.0.0"
-  },
-  "autoload": {
-    "psr-4": {
-      "TYPO3\\Components\\TestingFramework\\": "Classes/",
-      "TYPO3\\CMS\\Core\\Tests\\": "compat/core/",
-      "TYPO3\\CMS\\Fluid\\Tests\\": "compat/fluid/"
-    }
-  }
-}
index 95faac5..7cd886d 100644 (file)
@@ -53,8 +53,7 @@
                "doctrine/dbal": "~2.5.4"
        },
        "require-dev": {
-               "phpunit/phpunit": "^5.6",
-               "mikey179/vfsStream": "~1.6.0",
+               "typo3/testing-framework": "~1.0.0",
                "codeception/codeception": "^2.2",
                "se/selenium-server-standalone": "~2.53",
                "typo3/cms-styleguide": "~8.0.8",
index 9772d83..6609863 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
         "This file is @generated automatically"
     ],
-    "content-hash": "027d9b4728d85519493ad8f083a4a639",
+    "content-hash": "0a93bff6ece95bdbe45d883432719012",
     "packages": [
         {
             "name": "cogpowered/finediff",
             "time": "2017-03-14T18:36:19+00:00"
         },
         {
+            "name": "typo3/testing-framework",
+            "version": "1.0.0",
+            "source": {
+                "type": "git",
+                "url": "https://github.com/TYPO3/testing-framework.git",
+                "reference": "6142661e9ae04ad8fdfd5128b48548af0c89d66d"
+            },
+            "dist": {
+                "type": "zip",
+                "url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/6142661e9ae04ad8fdfd5128b48548af0c89d66d",
+                "reference": "6142661e9ae04ad8fdfd5128b48548af0c89d66d",
+                "shasum": ""
+            },
+            "require": {
+                "mikey179/vfsstream": "~1.6.0",
+                "phpunit/phpunit": "^5.6",
+                "typo3/cms-backend": "^8.5",
+                "typo3/cms-core": "^8.5",
+                "typo3/cms-extbase": "^8.5",
+                "typo3/cms-fluid": "^8.5",
+                "typo3/cms-frontend": "^8.5",
+                "typo3fluid/fluid": "^2.2"
+            },
+            "suggest": {
+                "codeception/codeception": "^2.2",
+                "se/selenium-server-standalone": "~2.53",
+                "typo3/cms-saltedpasswords": "^8.5",
+                "typo3/cms-styleguide": "~8.0.8"
+            },
+            "type": "library",
+            "autoload": {
+                "psr-4": {
+                    "TYPO3\\TestingFramework\\": "Classes/",
+                    "TYPO3\\CMS\\Core\\Tests\\": "compat/core/",
+                    "TYPO3\\CMS\\Fluid\\Tests\\": "compat/fluid/"
+                }
+            },
+            "notification-url": "https://packagist.org/downloads/",
+            "license": [
+                "GPL-2.0+"
+            ],
+            "authors": [
+                {
+                    "name": "The TYPO3 Community",
+                    "homepage": "https://typo3.org/community/",
+                    "role": "Contributor"
+                },
+                {
+                    "name": "TYPO3 CMS Core Team",
+                    "homepage": "https://forge.typo3.org/projects/typo3cms-core",
+                    "role": "Developer"
+                }
+            ],
+            "description": "The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.",
+            "homepage": "https://typo3.org/",
+            "keywords": [
+                "testing",
+                "tests",
+                "typo3"
+            ],
+            "time": "2017-03-31T14:08:16+00:00"
+        },
+        {
             "name": "webmozart/assert",
             "version": "1.2.0",
             "source": {
index bd0a31f..bc31723 100644 (file)
@@ -40,7 +40,7 @@ class LocalizationControllerTest extends \TYPO3\TestingFramework\Core\Functional
         Bootstrap::getInstance()->initializeLanguageObject();
 
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/backend/Tests/Functional/Fixtures/pages.xml');
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/sys_language.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_language.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/backend/Tests/Functional/Controller/Page/Fixtures/tt_content-default-language.xml');
 
         $this->subject = new LocalizationController();
index 2a7caed..121c532 100644 (file)
@@ -30,7 +30,7 @@ class BackendUtilityTest extends \TYPO3\TestingFramework\Core\Functional\Functio
     {
         parent::setUp();
 
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/backend/Tests/Functional/Utility/Fixtures/sys_domain.xml');
     }
 
index 5e7f620..3152cfc 100644 (file)
@@ -52,7 +52,7 @@ abstract class AbstractActionTestCase extends \TYPO3\CMS\Core\Tests\Functional\D
         parent::setUp();
         $this->importScenarioDataSet('LiveDefaultPages');
         $this->importScenarioDataSet('LiveDefaultElements');
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
 
         $this->setUpFrontendRootPage(1, ['typo3/sysext/core/Tests/Functional/Fixtures/Frontend/JsonRenderer.ts']);
         $this->backendUser->workspace = 0;
index 2e97aa3..d60a766 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-require '{originalRoot}components/testing_framework/Classes/Core/Functional/Framework/Frontend/RequestBootstrap.php';
+require '{vendorPath}typo3/testing-framework/Classes/Core/Functional/Framework/Frontend/RequestBootstrap.php';
 \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\RequestBootstrap::setGlobalVariables({arguments});
 \TYPO3\TestingFramework\Core\Functional\Framework\Frontend\RequestBootstrap::executeAndOutput();
 ?>
index 71fe869..183df4f 100644 (file)
@@ -40,7 +40,7 @@ class ResourceStorageTest extends \TYPO3\TestingFramework\Core\Functional\Functi
      */
     public function getNestedProcessingFolderTest()
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
         $this->setUpBackendUserFromFixture(1);
         $subject = (new StorageRepository())->findByUid(1);
         $subject->setEvaluatePermissions(false);
@@ -76,7 +76,7 @@ class ResourceStorageTest extends \TYPO3\TestingFramework\Core\Functional\Functi
      */
     public function isWithinFileMountBoundariesRespectsReadOnlyFileMounts($targetDirectory, $fileMountFolder, $isFileMountReadOnly, $checkWriteAccess, $expectedResult)
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
         $fileName = 'bar.txt';
         $this->setUpBackendUserFromFixture(1);
         GeneralUtility::mkdir_deep(PATH_site . 'fileadmin/_processed_');
@@ -152,7 +152,7 @@ class ResourceStorageTest extends \TYPO3\TestingFramework\Core\Functional\Functi
      */
     public function getProcessingRootFolderTest()
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
         $this->setUpBackendUserFromFixture(1);
 
         $subject = (new StorageRepository())->findByUid(1);
@@ -167,7 +167,7 @@ class ResourceStorageTest extends \TYPO3\TestingFramework\Core\Functional\Functi
     public function getRoleReturnsDefaultForRegularFolders()
     {
         $folderIdentifier = $this->getUniqueId();
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
         $this->setUpBackendUserFromFixture(1);
 
         $subject = (new StorageRepository())->findByUid(1);
@@ -183,7 +183,7 @@ class ResourceStorageTest extends \TYPO3\TestingFramework\Core\Functional\Functi
      */
     public function replaceFileFailsIfLocalFileDoesNotExist()
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
         $this->setUpBackendUserFromFixture(1);
         $subject = (new StorageRepository())->findByUid(1);
 
@@ -202,7 +202,7 @@ class ResourceStorageTest extends \TYPO3\TestingFramework\Core\Functional\Functi
      */
     public function createFolderThrowsExceptionIfParentFolderDoesNotExist()
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/sys_file_storage.xml');
         $this->setUpBackendUserFromFixture(1);
         $subject = (new StorageRepository())->findByUid(1);
 
index 3250f0c..2e7c7b1 100644 (file)
@@ -60,7 +60,7 @@ class CountTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCa
     {
         parent::setUp();
 
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/blogs.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/posts.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/post-post-mm.xml');
index 056bb34..c5331bc 100644 (file)
@@ -40,7 +40,7 @@ class EnableFieldsTest extends AbstractDataHandlerActionTestCase
     {
         parent::setUp();
 
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/fe_groups.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/fe_users.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/blogs-with-fe_groups.xml');
index b9382a4..424b190 100644 (file)
@@ -50,7 +50,7 @@ class InTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTestCase
     {
         parent::setUp();
 
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/blogs.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/posts.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/tags.xml');
index 7b17295..ada80bf 100644 (file)
@@ -51,7 +51,7 @@ class OperatorTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTes
     {
         parent::setUp();
 
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/blogs.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/posts.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/tags.xml');
index 16bc0da..0adbc23 100644 (file)
@@ -48,7 +48,7 @@ class RelationTest extends \TYPO3\TestingFramework\Core\Functional\FunctionalTes
     {
         parent::setUp();
 
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/blogs.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/posts.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/tags.xml');
index 3ad305d..0bb2644 100644 (file)
@@ -57,7 +57,7 @@ class TranslationTest extends \TYPO3\TestingFramework\Core\Functional\Functional
          *   -> EN: Post2
          * Post3
          */
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/blogs.xml');
         $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/extbase/Tests/Functional/Persistence/Fixtures/translated-posts.xml');
 
index fd64fc8..f3346db 100644 (file)
@@ -52,7 +52,7 @@ class WorkspaceServiceTest extends \TYPO3\TestingFramework\Core\Functional\Funct
      */
     public function versionsFromSpecificWorkspaceCanBeFound()
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         $result = $service->selectVersionsInWorkspace(91, 0, -99, 2);
@@ -67,7 +67,7 @@ class WorkspaceServiceTest extends \TYPO3\TestingFramework\Core\Functional\Funct
      */
     public function versionsFromAllWorkspaceCanBeFound()
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         $result = $service->selectVersionsInWorkspace(\TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES, 0, -99, 2);
@@ -80,7 +80,7 @@ class WorkspaceServiceTest extends \TYPO3\TestingFramework\Core\Functional\Funct
      */
     public function versionsCanBeFoundRecursive()
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         $result = $service->selectVersionsInWorkspace(91, 0, -99, 1, 99);
@@ -93,7 +93,7 @@ class WorkspaceServiceTest extends \TYPO3\TestingFramework\Core\Functional\Funct
      */
     public function versionsCanBeFilteredToSpecificStage()
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         // testing stage 1
@@ -115,7 +115,7 @@ class WorkspaceServiceTest extends \TYPO3\TestingFramework\Core\Functional\Funct
      */
     public function versionsCanBeFilteredToSpecificLifecycleStep()
     {
-        $this->importDataSet(ORIGINAL_ROOT . 'components/testing_framework/Resources/Core/Functional/Fixtures/pages.xml');
+        $this->importDataSet('PACKAGE:typo3/testing-framework/Resources/Core/Functional/Fixtures/pages.xml');
         $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
         $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
         // testing all "draft" records