[TASK] Deprecate extbase StopActionException
[Packages/TYPO3.CMS.git] / typo3 / sysext / form / Tests / Unit / Domain / Finishers / RedirectFinisherTest.php
index 7b14ed9..f7358a4 100644 (file)
@@ -18,9 +18,9 @@ declare(strict_types=1);
 namespace TYPO3\CMS\Form\Tests\Unit\Domain\Finishers;
 
 use Prophecy\Argument;
+use TYPO3\CMS\Core\Http\PropagateResponseException;
 use TYPO3\CMS\Core\Http\Response;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
-use TYPO3\CMS\Extbase\Mvc\Exception\StopActionException;
 use TYPO3\CMS\Extbase\Mvc\Request;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
 use TYPO3\CMS\Extbase\Object\Exception;
@@ -73,18 +73,18 @@ class RedirectFinisherTest extends UnitTestCase
         $finisherContextProphecy->cancel()->shouldBeCalledOnce();
 
         $translationServiceProphecy = $this->prophesize(TranslationService::class);
+        GeneralUtility::setSingletonInstance(TranslationService::class, $translationServiceProphecy->reveal());
         $translationServiceProphecy->translateFinisherOption(Argument::cetera())->willReturnArgument(3);
 
         $objectManagerProphecy = $this->prophesize(ObjectManager::class);
         $objectManagerProphecy->get(UriBuilder::class)->willReturn(new UriBuilder());
-        $objectManagerProphecy->get(TranslationService::class)->willReturn($translationServiceProphecy->reveal());
         GeneralUtility::setSingletonInstance(ObjectManager::class, $objectManagerProphecy->reveal());
         $redirectFinisherMock->injectObjectManager($objectManagerProphecy->reveal());
 
         try {
             $redirectFinisherMock->execute($finisherContextProphecy->reveal());
             self::fail('RedirectFinisher did not throw expected exception.');
-        } /** @noinspection PhpRedundantCatchClauseInspection */ catch (StopActionException $e) {
+        } /** @noinspection PhpRedundantCatchClauseInspection */ catch (PropagateResponseException $e) {
             $response = $e->getResponse();
             self::assertSame($uriPrefix . $expectedPage, $response->getHeader('Location')[0]);
         }