Commit 277121c 1 parent 8fa23a4 commit 277121c Copy full SHA for 277121c
File tree 1 file changed +8
-1
lines changed
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 3
3
namespace PrototypeIntegration \PrototypeIntegration \Tests \Unit \Processor ;
4
4
5
5
use PrototypeIntegration \PrototypeIntegration \Processor \TypoLinkStringProcessor ;
6
+ use TYPO3 \CMS \Core \EventDispatcher \EventDispatcher ;
6
7
use TYPO3 \CMS \Core \LinkHandling \TypoLinkCodecService ;
7
8
use TYPO3 \CMS \Frontend \ContentObject \ContentObjectRenderer ;
8
9
use TYPO3 \TestingFramework \Core \Unit \UnitTestCase ;
@@ -20,7 +21,13 @@ protected function setUp(): void
20
21
{
21
22
parent ::setUp ();
22
23
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 );
24
31
25
32
$ contentObjectRendererMock = $ this ->createMock (ContentObjectRenderer::class);
26
33
$ contentObjectRendererMock
You can’t perform that action at this time.
0 commit comments