From 5cf75f6a1f1726e78518935bb64d581e4dcb276b Mon Sep 17 00:00:00 2001 From: Torben Hansen <derhansen@gmail.com> Date: Sat, 29 Oct 2022 14:01:48 +0200 Subject: [PATCH] [TASK] Replace prophecy in EXT:form FormPersistenceManagerTest Resolves: #98903 Releases: main Change-Id: I1de1bb7df01d552b82dd13fea0d287cbe654342a Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/76329 Tested-by: core-ci <typo3@b13.com> Tested-by: Oliver Klee <typo3-coding@oliverklee.de> Tested-by: Nikita Hovratov <nikita.h@live.de> Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de> Reviewed-by: Nikita Hovratov <nikita.h@live.de> --- .../Mvc/Persistence/FormPersistenceManagerTest.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/typo3/sysext/form/Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php b/typo3/sysext/form/Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php index 9cdb061f5ed5..c84bf03eca16 100644 --- a/typo3/sysext/form/Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php +++ b/typo3/sysext/form/Tests/Unit/Mvc/Persistence/FormPersistenceManagerTest.php @@ -17,8 +17,6 @@ declare(strict_types=1); namespace TYPO3\CMS\Form\Tests\Unit\Mvc\Persistence; -use Prophecy\Argument; -use Prophecy\PhpUnit\ProphecyTrait; use TYPO3\CMS\Core\Cache\Frontend\VariableFrontend; use TYPO3\CMS\Core\Resource\File; use TYPO3\CMS\Core\Resource\Folder; @@ -37,8 +35,6 @@ use TYPO3\TestingFramework\Core\Unit\UnitTestCase; */ class FormPersistenceManagerTest extends UnitTestCase { - use ProphecyTrait; - /** * @test */ @@ -677,11 +673,10 @@ class FormPersistenceManagerTest extends UnitTestCase 'dummy', ], [], '', false); - $typoScriptServiceProphecy = $this->prophesize(TypoScriptService::class); - GeneralUtility::addInstance(TypoScriptService::class, $typoScriptServiceProphecy->reveal()); - $typoScriptServiceProphecy - ->resolvePossibleTypoScriptConfiguration(Argument::cetera()) + $typoScriptServiceMock = $this->createMock(TypoScriptService::class); + $typoScriptServiceMock->method('resolvePossibleTypoScriptConfiguration')->with(self::anything()) ->willReturnArgument(0); + GeneralUtility::addInstance(TypoScriptService::class, $typoScriptServiceMock); $mockController->_set('typoScriptSettings', [ 'formDefinitionOverrides' => [ -- GitLab