Skip to content

Commit 277121c

Browse files
committed
[TASK] Migrate TypoLink Processor test to TYPO3 v13
1 parent 8fa23a4 commit 277121c

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Tests/Unit/Processor/TypoLinkStringProcessorTest.php

+8-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
namespace PrototypeIntegration\PrototypeIntegration\Tests\Unit\Processor;
44

55
use PrototypeIntegration\PrototypeIntegration\Processor\TypoLinkStringProcessor;
6+
use TYPO3\CMS\Core\EventDispatcher\EventDispatcher;
67
use TYPO3\CMS\Core\LinkHandling\TypoLinkCodecService;
78
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;
89
use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
@@ -20,7 +21,13 @@ protected function setUp(): void
2021
{
2122
parent::setUp();
2223

23-
$typoLinkCodecService = new TypoLinkCodecService();
24+
$eventDispatcherMock = $this->createMock(EventDispatcher::class);
25+
$eventDispatcherMock
26+
->method('dispatch')
27+
->willReturnArgument(0)
28+
;
29+
30+
$typoLinkCodecService = new TypoLinkCodecService($eventDispatcherMock);
2431

2532
$contentObjectRendererMock = $this->createMock(ContentObjectRenderer::class);
2633
$contentObjectRendererMock

0 commit comments

Comments
 (0)