[TASK] Update testing framework to 6.0 02/62502/11
authorSusanne Moog <look@susi.dev>
Sat, 30 Nov 2019 19:09:52 +0000 (20:09 +0100)
committerBenni Mack <benni@typo3.org>
Tue, 3 Dec 2019 07:32:45 +0000 (08:32 +0100)
The testing framework has been reworked and slimmed down.
To make use of it, tests had to be adjusted.

   composer require --dev typo3/testing-framework:"~6.0.0"

Resolves: #89815
Releases: master
Change-Id: Ib0a8d7436070ef17be96a5f4011f796dd15b09fd
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/62502
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Benni Mack <benni@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
composer.json
composer.lock
typo3/sysext/core/composer.json
typo3/sysext/fluid/Tests/Unit/Core/Rendering/RenderingContextTest.php
typo3/sysext/fluid/Tests/Unit/Core/Widget/AbstractWidgetViewHelperTest.php
typo3/sysext/fluid/Tests/Unit/ViewHelpers/Link/PageViewHelperTest.php

index a1f04b5..122c5f2 100644 (file)
@@ -79,7 +79,7 @@
                "phpspec/prophecy": "^1.7.5",
                "rector/rector": "^0.5.0",
                "typo3/cms-styleguide": "~10.0.2",
-               "typo3/testing-framework": "~5.0.16"
+               "typo3/testing-framework": "~6.0.0"
        },
        "suggest": {
                "ext-gd": "GDlib/Freetype is required for building images with text (GIFBUILDER) and can also be used to scale images",
index 85988cb..2817fa1 100644 (file)
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "264be898d834ad68f4bdc3345451701c",
+    "content-hash": "ad3295bdf8c8700d9be0f2e05563697e",
     "packages": [
         {
             "name": "cogpowered/finediff",
             "authors": [
                 {
                     "name": "Sebastian Bergmann",
-                    "role": "lead",
-                    "email": "sebastian@phpunit.de"
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
                 }
             ],
             "description": "Utility class for timing",
             "authors": [
                 {
                     "name": "Sebastian Bergmann",
-                    "role": "lead",
-                    "email": "sebastian@phpunit.de"
+                    "email": "sebastian@phpunit.de",
+                    "role": "lead"
                 }
             ],
             "description": "Collection of value objects that represent the types of the PHP type system",
         },
         {
             "name": "typo3/testing-framework",
-            "version": "5.0.16",
+            "version": "6.0.0",
             "source": {
                 "type": "git",
                 "url": "https://github.com/TYPO3/testing-framework.git",
-                "reference": "b13774ce13da2fc23b601bd00963db4c64636b3a"
+                "reference": "c74a87a2037fca3eaaebeaa886a874cc97fce997"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/b13774ce13da2fc23b601bd00963db4c64636b3a",
-                "reference": "b13774ce13da2fc23b601bd00963db4c64636b3a",
+                "url": "https://api.github.com/repos/TYPO3/testing-framework/zipball/c74a87a2037fca3eaaebeaa886a874cc97fce997",
+                "reference": "c74a87a2037fca3eaaebeaa886a874cc97fce997",
                 "shasum": ""
             },
             "require": {
                 "mikey179/vfsstream": "~1.6.8",
-                "phpunit/phpunit": "^8.2.3",
+                "phpunit/phpunit": "^8.3",
                 "typo3/cms-backend": "10.*.*@dev",
                 "typo3/cms-core": "10.*.*@dev",
                 "typo3/cms-extbase": "10.*.*@dev",
                 "tests",
                 "typo3"
             ],
-            "time": "2019-11-21T15:21:42+00:00"
+            "time": "2019-12-02T16:43:08+00:00"
         }
     ],
     "aliases": [],
index 9824e1e..d554cec 100644 (file)
@@ -57,7 +57,7 @@
                "friendsofphp/php-cs-fixer": "^2.16.1",
                "phpspec/prophecy": "^1.7.5",
                "typo3/cms-styleguide": "~10.0.2",
-               "typo3/testing-framework": "~5.0.16"
+               "typo3/testing-framework": "~6.0.0"
        },
        "suggest": {
                "ext-fileinfo": "Used for proper file type detection in the file abstraction layer",
index 3b457ec..6db1b86 100644 (file)
@@ -37,7 +37,7 @@ class RenderingContextTest extends UnitTestCase
     {
         parent::setUp();
         $this->renderingContext = $this->getMockBuilder(RenderingContext::class)
-            ->addMethods(['dummy'])
+            ->setMethods(['dummy'])
             ->disableOriginalConstructor()
             ->getMock();
     }
@@ -48,7 +48,7 @@ class RenderingContextTest extends UnitTestCase
     public function setControllerContextWithSubpackageKeySetsExpectedControllerContext()
     {
         $renderingContext = $this->getMockBuilder(RenderingContext::class)
-            ->onlyMethods(['setControllerAction', 'setControllerName'])
+            ->setMethods(['setControllerAction', 'setControllerName'])
             ->disableOriginalConstructor()
             ->getMock();
         $request = $this->getMockBuilder(Request::class)
@@ -106,7 +106,7 @@ class RenderingContextTest extends UnitTestCase
     public function setControllerActionProcessesInputCorrectly($input, $expected)
     {
         $subject = $this->getMockBuilder(RenderingContext::class)
-            ->addMethods(['dummy'])
+            ->setMethods(['dummy'])
             ->disableOriginalConstructor()
             ->getMock();
         $request = $this->getMockBuilder(Request::class)->setMethods(['setControllerActionName'])->getMock();
index 4e69f28..4be1097 100644 (file)
@@ -95,7 +95,7 @@ class AbstractWidgetViewHelperTest extends UnitTestCase
         $this->controllerContext = $this->createMock(ControllerContext::class);
         $this->controllerContext->expects(self::any())->method('getRequest')->willReturn($this->request);
         $this->renderingContext = $this->getMockBuilder(RenderingContext::class)
-            ->onlyMethods(['getControllerContext'])
+            ->setMethods(['getControllerContext'])
             ->disableOriginalConstructor()
             ->getMock();
         $this->renderingContext->expects(self::any())->method('getControllerContext')->willReturn($this->controllerContext);
index d790903..ba53990 100644 (file)
@@ -62,7 +62,7 @@ class PageViewHelperTest extends ViewHelperBaseTestcase
         $this->controllerContext->expects(self::any())->method('getRequest')->willReturn($this->request->reveal());
         $this->arguments = [];
         $this->renderingContext = $this->getMockBuilder(RenderingContext::class)
-            ->onlyMethods(['getControllerContext'])
+            ->setMethods(['getControllerContext'])
             ->disableOriginalConstructor()
             ->getMock();
         $this->renderingContext->expects(self::any())->method('getControllerContext')->willReturn($this->controllerContext);