[TASK] Testing Framework: Move fluid base test and ensure BC 23/51023/5
authorSusanne Moog <susanne.moog@typo3.com>
Thu, 22 Dec 2016 14:45:51 +0000 (15:45 +0100)
committerHelmut Hummel <typo3@helhum.io>
Fri, 23 Dec 2016 13:51:10 +0000 (14:51 +0100)
After the merge of #79025 now the fluid base test case for viewhelpers
should be moved to the testing framework.

A compat layer for the old namespaces is introduced.

Additionally some small leftovers in documentation and CI configuration were fixed.

Change-Id: I78b9670a1ee1fadb4f4c36265c3a51cd1e879e50
Releases: master
Resolves: #79075
Reviewed-on: https://review.typo3.org/51023
Tested-by: Helmut Hummel <typo3@helhum.io>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Helmut Hummel <typo3@helhum.io>
58 files changed:
.appveyor.yml
components/testing_framework/compat/core/AccessibleObjectInterface.php [new file with mode: 0644]
components/testing_framework/compat/core/BaseTestCase.php [new file with mode: 0644]
components/testing_framework/compat/core/Exception.php [new file with mode: 0644]
components/testing_framework/compat/core/FileStreamWrapper.php [new file with mode: 0644]
components/testing_framework/compat/core/FunctionalTestCase.php [new file with mode: 0644]
components/testing_framework/compat/core/Testbase.php [new file with mode: 0644]
components/testing_framework/compat/core/UnitTestCase.php [new file with mode: 0644]
components/testing_framework/compat/fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php [new file with mode: 0644]
components/testing_framework/core/Build/FunctionalTests.xml
components/testing_framework/fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php [new file with mode: 0644]
composer.json
composer.lock
typo3/sysext/core/Build/Scripts/checkFilePermissions.sh
typo3/sysext/core/Documentation/Changelog/master/Breaking-79025-ExtractTestingFrameworkForTYPO3.rst
typo3/sysext/core/Tests/Unit/ViewHelpers/IconForRecordViewHelperTest.php
typo3/sysext/core/Tests/Unit/ViewHelpers/IconViewHelperTest.php
typo3/sysext/fluid/Classes/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php [deleted file]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/BaseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/Security/IfAuthenticatedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Be/Security/IfHasRoleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/CObjectViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FlashMessagesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormFieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/AbstractFormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/ButtonViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/CheckboxViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/FormFieldViewHelperBaseTestcase.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/RadioViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/SelectViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/TextfieldViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Form/UploadViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/FormViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/BytesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CaseViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CropViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/CurrencyViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/DateViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesDecodeViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/HtmlentitiesViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/Nl2brViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/NumberViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/PaddingViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/StripTagsViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Format/UrlencodeViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/ImageViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/ExternalViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/PageViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/TypolinkViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfAuthenticatedViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Security/IfHasRoleViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/TranslateViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/EmailViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/ExternalViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/PageViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Uri/TypolinkViewHelperTest.php
typo3/sysext/install/Tests/Unit/ViewHelpers/Format/PhpErrorCodeViewHelperTest.php

index 2fdcf3b..5aa3fab 100644 (file)
@@ -45,8 +45,8 @@ services:
 
 test_script:
   - cd C:\projects\typotest
-  - bin\phpunit.bat -c typo3/sysext/core/Build/UnitTests.xml
-  - bin\phpunit.bat -c typo3/sysext/core/Build/FunctionalTests.xml
+  - bin\phpunit.bat -c components/testing_framework/core/Build/UnitTests.xml
+  - bin\phpunit.bat -c components/testing_framework/core/Build/FunctionalTests.xml
 
 notifications:
   - provider: Slack
diff --git a/components/testing_framework/compat/core/AccessibleObjectInterface.php b/components/testing_framework/compat/core/AccessibleObjectInterface.php
new file mode 100644 (file)
index 0000000..b75f26a
--- /dev/null
@@ -0,0 +1,22 @@
+<?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\CMS\Components\TestingFramework\Core\AccessibleObjectInterface
+{
+}
diff --git a/components/testing_framework/compat/core/BaseTestCase.php b/components/testing_framework/compat/core/BaseTestCase.php
new file mode 100644 (file)
index 0000000..7deae5d
--- /dev/null
@@ -0,0 +1,22 @@
+<?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\CMS\Components\TestingFramework\Core\BaseTestCase
+{
+}
diff --git a/components/testing_framework/compat/core/Exception.php b/components/testing_framework/compat/core/Exception.php
new file mode 100644 (file)
index 0000000..72bc845
--- /dev/null
@@ -0,0 +1,22 @@
+<?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\CMS\Components\TestingFramework\Core\Exception
+{
+}
diff --git a/components/testing_framework/compat/core/FileStreamWrapper.php b/components/testing_framework/compat/core/FileStreamWrapper.php
new file mode 100644 (file)
index 0000000..de6b50b
--- /dev/null
@@ -0,0 +1,22 @@
+<?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\CMS\Components\TestingFramework\Core\FileStreamWrapper
+{
+}
diff --git a/components/testing_framework/compat/core/FunctionalTestCase.php b/components/testing_framework/compat/core/FunctionalTestCase.php
new file mode 100644 (file)
index 0000000..b2ac7a2
--- /dev/null
@@ -0,0 +1,22 @@
+<?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\CMS\Components\TestingFramework\Core\FunctionalTestCase
+{
+}
diff --git a/components/testing_framework/compat/core/Testbase.php b/components/testing_framework/compat/core/Testbase.php
new file mode 100644 (file)
index 0000000..af50625
--- /dev/null
@@ -0,0 +1,22 @@
+<?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\CMS\Components\TestingFramework\Core\Testbase
+{
+}
diff --git a/components/testing_framework/compat/core/UnitTestCase.php b/components/testing_framework/compat/core/UnitTestCase.php
new file mode 100644 (file)
index 0000000..b9d6cf7
--- /dev/null
@@ -0,0 +1,22 @@
+<?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\CMS\Components\TestingFramework\Core\UnitTestCase
+{
+}
diff --git a/components/testing_framework/compat/fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php b/components/testing_framework/compat/fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php
new file mode 100644 (file)
index 0000000..ca763e5
--- /dev/null
@@ -0,0 +1,22 @@
+<?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\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase
+{
+}
index 7c91c73..cfa3bb0 100644 (file)
@@ -1,7 +1,7 @@
 <!--
        Functional test suites setup
 
-       Functional tests should extend from \TYPO3\CMS\Core\Tests\FunctionalTestCase,
+       Functional tests should extend from \TYPO3\CMS\Components\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
diff --git a/components/testing_framework/fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php b/components/testing_framework/fluid/Unit/ViewHelpers/ViewHelperBaseTestcase.php
new file mode 100644 (file)
index 0000000..39e28fb
--- /dev/null
@@ -0,0 +1,191 @@
+<?php
+namespace TYPO3\CMS\Components\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\CMS\Components\TestingFramework\Core\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 \TYPO3\CMS\Fluid\Core\ViewHelper\Arguments
+     */
+    protected $arguments;
+
+    /**
+     * @var \TYPO3\CMS\Extbase\Mvc\Web\Request
+     */
+    protected $request;
+
+    /**
+     * @var \TYPO3\CMS\Fluid\Tests\Unit\Core\Rendering\RenderingContext
+     */
+    protected $renderingContext;
+
+    /**
+     * @var \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService
+     */
+    protected $mvcPropertyMapperConfigurationService;
+
+    /**
+     * @return void
+     */
+    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
+     * @return void
+     */
+    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);
+    }
+}
index 32ab037..3f804f3 100644 (file)
                        "TYPO3\\CMS\\Viewpage\\": "typo3/sysext/viewpage/Classes/",
                        "TYPO3\\CMS\\WizardCrpages\\": "typo3/sysext/wizard_crpages/Classes/",
                        "TYPO3\\CMS\\WizardSortpages\\": "typo3/sysext/wizard_sortpages/Classes/",
-                       "TYPO3\\CMS\\Workspaces\\": "typo3/sysext/workspaces/Classes/"
+                       "TYPO3\\CMS\\Workspaces\\": "typo3/sysext/workspaces/Classes/",
+                       "TYPO3\\CMS\\Components\\TestingFramework\\Core\\": "components/testing_framework/core/",
+                       "TYPO3\\CMS\\Components\\TestingFramework\\Fluid\\": "components/testing_framework/fluid/",
+                       "TYPO3\\CMS\\Core\\Tests\\": "components/testing_framework/compat/core/",
+                       "TYPO3\\CMS\\Fluid\\Tests\\": "components/testing_framework/compat/fluid/"
                },
                "classmap": [
                        "typo3/sysext/core/Resources/PHP/"
        "autoload-dev": {
                "psr-4": {
                        "TYPO3\\CMS\\Backend\\Tests\\": "typo3/sysext/backend/Tests/",
-                       "TYPO3\\CMS\\Components\\TestingFramework\\": "components/testing_framework/",
                        "TYPO3\\CMS\\Belog\\Tests\\": "typo3/sysext/belog/Tests/",
                        "TYPO3\\CMS\\Beuser\\Tests\\": "typo3/sysext/beuser/Tests/",
                        "TYPO3\\CMS\\Core\\Tests\\": "typo3/sysext/core/Tests/",
index b568ae7..05db8b4 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"
     ],
-    "hash": "9cef1509387195018c14676a38110870",
+    "hash": "941c85049e2f636d89aefa1d452020cb",
     "content-hash": "40dde6fea5fca829a627ed88d053a45d",
     "packages": [
         {
index c9d17b0..731efbd 100755 (executable)
 
 # Array of files to ignore the file permission check
 IGNORE=(
+  "components/testing_framework/core/Build/Scripts/splitFunctionalTests.sh"
   "typo3/cli_dispatch.phpsh"
   "typo3/sysext/core/Build/Scripts/cglFixMyCommit.sh"
   "typo3/sysext/core/Build/Scripts/checkFilePermissions.sh"
   "typo3/sysext/core/Build/Scripts/duplicateExceptionCodeCheck.sh"
-  "typo3/sysext/core/Build/Scripts/splitFunctionalTests.sh"
   "typo3/sysext/core/Build/Scripts/xlfcheck.sh"
   "typo3/sysext/core/Build/Scripts/validateRstFiles.sh"
   "typo3/sysext/core/bin/typo3"
index 7755cf2..7841e42 100644 (file)
@@ -9,13 +9,19 @@ See :issue:`79025`
 Description
 ===========
 
-Since the .gitattributes export change, a lot of base test classes for writing own tests are missing in distribution builds. To get a sustainable future-proof solution, the TYPO3 core testing framework will be extracted to an own component.
+Since the .gitattributes export change, a lot of base test classes for writing own tests are missing in distribution builds.
+To get a sustainable future-proof solution, the TYPO3 core testing framework will be extracted to an own component.
 
 
 Impact
 ======
 
-All test classes that are considered as part of the TYPO3 core testing framework are moved to components/testing_framework and will in the long run be released as an own package that can be required for dev environments.
+All test classes that are considered as part of the TYPO3 core testing framework are moved to components/testing_framework and
+will in the long run be released as an own package that can be required for dev environments.
+
+Moving the classes results in changed namespaces. To ensure compatibility with earlier TYPO3 versions all classes that
+were previously available in distribution (non-source) installations are additionally provided by their old namespace names
+and will be provided for 8 LTS.
 
 
 Affected Installations
@@ -29,4 +35,6 @@ Migration
 
 Change the namespace from TYPO3\CMS\Core\Tests to TYPO3\CMS\Components\TestingFramework\Core or in case of the xml fixtures the corresponding file path.
 
+If you need to ensure compatibility with multiple TYPO3 versions, use the base test classes with their old names.
+
 .. index:: PHP-API
index 963bd01..eb879b8 100644 (file)
@@ -16,12 +16,12 @@ namespace TYPO3\CMS\Core\Tests\Unit\ViewHelpers;
 
 use Prophecy\Argument;
 use Prophecy\Prophecy\ObjectProphecy;
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\ViewHelpers\IconForRecordViewHelper;
 use TYPO3\CMS\Core\ViewHelpers\IconViewHelper;
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3Fluid\Fluid\Core\Rendering\RenderingContextInterface;
 
 /**
index 71878cb..ee0cef5 100644 (file)
@@ -15,12 +15,12 @@ namespace TYPO3\CMS\Core\Tests\Unit\ViewHelpers;
  */
 
 use Prophecy\Argument;
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Type\Icon\IconState;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Core\ViewHelpers\IconViewHelper;
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 
 /**
  * Test case
diff --git a/typo3/sysext/fluid/Classes/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php b/typo3/sysext/fluid/Classes/Tests/Unit/ViewHelpers/ViewHelperBaseTestcase.php
deleted file mode 100644 (file)
index 8865db1..0000000
+++ /dev/null
@@ -1,191 +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!
- */
-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\CMS\Components\TestingFramework\Core\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 \TYPO3\CMS\Fluid\Core\ViewHelper\Arguments
-     */
-    protected $arguments;
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Web\Request
-     */
-    protected $request;
-
-    /**
-     * @var \TYPO3\CMS\Fluid\Tests\Unit\Core\Rendering\RenderingContext
-     */
-    protected $renderingContext;
-
-    /**
-     * @var \TYPO3\CMS\Extbase\Mvc\Controller\MvcPropertyMappingConfigurationService
-     */
-    protected $mvcPropertyMapperConfigurationService;
-
-    /**
-     * @return void
-     */
-    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
-     * @return void
-     */
-    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);
-    }
-}
index 1b28552..f051e26 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\BaseViewHelper;
 
 /**
index 14f4f8d..dac5f68 100644 (file)
@@ -14,10 +14,12 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Be\Security;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
 /**
  * Testcase for be.security.ifAuthenticated view helper
  */
-class IfAuthenticatedViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase
+class IfAuthenticatedViewHelperTest extends ViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Be\Security\IfAuthenticatedViewHelper
index 22b33fe..602e1a5 100644 (file)
@@ -14,10 +14,12 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Be\Security;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
 /**
  * Testcase for be.security.ifHasRole view helper
  */
-class IfHasRoleViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase
+class IfHasRoleViewHelperTest extends ViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Be\Security\IfAuthenticatedViewHelper
index 90bc002..9a012e0 100644 (file)
@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  */
 
 use Prophecy\Argument;
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
 use TYPO3\CMS\Fluid\ViewHelpers\CObjectViewHelper;
 use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
index a694ebe..a2f4978 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Core\Messaging\FlashMessage;
 use TYPO3\CMS\Core\Messaging\FlashMessageQueue;
 use TYPO3\CMS\Fluid\ViewHelpers\FlashMessagesViewHelper;
index 53507c0..915fe48 100644 (file)
@@ -10,13 +10,14 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
      *                                                                        *
      * The TYPO3 project - inspiring people to share!                         *
      *                                                                        */
+
 use TYPO3\CMS\Fluid\ViewHelpers\Form\AbstractFormFieldViewHelper;
 use TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper;
 
 /**
  * Test for the Abstract Form view helper
  */
-class AbstractFormFieldViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\FormFieldViewHelperBaseTestcase
+class AbstractFormFieldViewHelperTest extends FormFieldViewHelperBaseTestcase
 {
     /**
      * @test
index eac57ff..aeec21f 100644 (file)
@@ -14,10 +14,12 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
 /**
  * Test for the Abstract Form view helper
  */
-class AbstractFormViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase
+class AbstractFormViewHelperTest extends ViewHelperBaseTestcase
 {
     /**
      * @test
index e67ebe4..9966284 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Form\ButtonViewHelper;
 
 /**
index 7153909..1cf7bb8 100644 (file)
@@ -2,8 +2,8 @@
 namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
 
 use Prophecy\Argument;
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Form\CheckboxViewHelper;
 
 /**
index 636cee0..fb5c3c5 100644 (file)
@@ -13,12 +13,14 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInterface;
 
 /**
  * Test for the Abstract Form view helper
  */
-abstract class FormFieldViewHelperBaseTestcase extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase
+abstract class FormFieldViewHelperBaseTestcase extends ViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface
index a199cbe..32ef9e8 100644 (file)
@@ -14,8 +14,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Extbase\Persistence\Generic\PersistenceManager;
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Form\RadioViewHelper;
 
 /**
index b39e1ec..8259cbb 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
 /**
index 8e329fb..fa078f6 100644 (file)
@@ -14,9 +14,9 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Extbase\Reflection\ReflectionService;
 use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form\Fixtures\EmptySyntaxTreeNode;
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Form\TextfieldViewHelper;
 
 /**
index 9a09928..d10efdf 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Form;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
 /**
index ec91a13..5c39f72 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\FormViewHelper;
 use TYPO3Fluid\Fluid\Core\ViewHelper\ViewHelperInterface;
 
index e24838a..5180ec2 100644 (file)
@@ -14,7 +14,7 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\BytesViewHelper;
 
 /**
index d5b4bce..b29e2b6 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\CaseViewHelper;
 
 /**
index d76621b..5b63406 100644 (file)
@@ -13,9 +13,9 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use PHPUnit_Framework_MockObject_MockObject;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\CropViewHelper;
 use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
 
@@ -30,7 +30,7 @@ class CropViewHelperTest extends ViewHelperBaseTestcase
     protected $viewHelper;
 
     /**
-     * @var ContentObjectRenderer|PHPUnit_Framework_MockObject_MockObject
+     * @var ContentObjectRenderer|\PHPUnit_Framework_MockObject_MockObject
      */
     protected $mockContentObject;
 
index 6cb732a..3200783 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\CurrencyViewHelper;
 
 /**
index 28f1f62..7eb3333 100644 (file)
@@ -13,8 +13,9 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\Core\ViewHelper\Exception;
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\DateViewHelper;
 
 /**
index 6f1f7a3..4accd49 100644 (file)
@@ -13,9 +13,10 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
 use Prophecy\Prophecy\ObjectProphecy;
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Extbase\Reflection\ReflectionService;
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlentitiesDecodeViewHelper;
 
 /**
index 524ccee..94c8913 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\HtmlentitiesViewHelper;
 
 /**
index 35b5751..a063a91 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\Nl2brViewHelper;
 
 /**
index 0c6da9f..7633121 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\NumberViewHelper;
 
 /**
index 24ad1d7..3384ba2 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\PaddingViewHelper;
 
 /**
index fc4d0fc..76e2343 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\StripTagsViewHelper;
 
 /**
index 35bdc58..aaa90c2 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Format;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Format\UrlencodeViewHelper;
 
 /**
index c909c02..5c837f5 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
+use TYPO3\CMS\Components\TestingFramework\Core\UnitTestCase;
 use TYPO3\CMS\Core\Resource\FileReference;
 use TYPO3\CMS\Extbase\Service\ImageService;
 use TYPO3\CMS\Fluid\ViewHelpers\ImageViewHelper;
@@ -21,7 +23,7 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 /**
  * Test case
  */
-class ImageViewHelperTest extends \TYPO3\CMS\Components\TestingFramework\Core\UnitTestCase
+class ImageViewHelperTest extends UnitTestCase
 {
     /**
      * @test
index 237f3b7..46b5354 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Link;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Link\EmailViewHelper;
 use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
@@ -22,7 +23,7 @@ use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 /**
  * Test case
  */
-class EmailViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase
+class EmailViewHelperTest extends ViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Link\EmailViewHelper
index 39d61af..7a92b9f 100644 (file)
@@ -13,12 +13,14 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Link;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3Fluid\Fluid\Core\ViewHelper\TagBuilder;
 
 /**
  * Test for \TYPO3\CMS\Fluid\ViewHelpers\Link\ExternalViewHelper
  */
-class ExternalViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase
+class ExternalViewHelperTest extends ViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Link\ExternalViewHelper
index 12cfa92..116ccff 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Link;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Link\PageViewHelper;
 
 /**
index 4416096..c656d69 100644 (file)
@@ -13,9 +13,10 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Link;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\Core\Rendering\RenderingContext;
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Link\TypolinkViewHelper;
 use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
 
index 3fc99ab..3eb70bd 100644 (file)
@@ -14,10 +14,12 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Security;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
 /**
  * Testcase for security.ifAuthenticated view helper
  */
-class IfAuthenticatedViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase
+class IfAuthenticatedViewHelperTest extends ViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Security\IfAuthenticatedViewHelper
index 0dae4ed..b5c7ff7 100644 (file)
@@ -14,10 +14,12 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Security;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
 /**
  * Testcase for security.ifHasRole view helper
  */
-class IfHasRoleViewHelperTest extends \TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase
+class IfHasRoleViewHelperTest extends ViewHelperBaseTestcase
 {
     /**
      * @var \TYPO3\CMS\Fluid\ViewHelpers\Security\IfHasRoleViewHelper
index eddbe01..d04db4f 100644 (file)
@@ -13,6 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers;
  *
  * The TYPO3 project - inspiring people to share!
  */
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Fixtures\TranslateViewHelperFixtureForEmptyString;
 use TYPO3\CMS\Fluid\ViewHelpers\TranslateViewHelper;
 
index 74fe72c..da84715 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Uri\EmailViewHelper;
 
 /**
index 0734c7f..26eeb54 100644 (file)
@@ -14,7 +14,7 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Uri\ExternalViewHelper;
 
 /**
index 30cb917..caa8083 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Uri\PageViewHelper;
 
 /**
index ad32661..6333d57 100644 (file)
@@ -13,7 +13,8 @@ namespace TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\Uri;
  *
  * The TYPO3 project - inspiring people to share!
  */
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 use TYPO3\CMS\Fluid\ViewHelpers\Uri\TypolinkViewHelper;
 
 /**
index aed8e3d..52cb303 100644 (file)
@@ -14,7 +14,7 @@ namespace TYPO3\CMS\Install\Tests\Unit\ViewHelpers\Format;
  * The TYPO3 project - inspiring people to share!
  */
 
-use TYPO3\CMS\Fluid\Tests\Unit\ViewHelpers\ViewHelperBaseTestcase;
+use TYPO3\CMS\Components\TestingFramework\Fluid\Unit\ViewHelpers\ViewHelperBaseTestcase;
 
 /**
  * Test case