2 declare(strict_types = 1);
22 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
35 'tableName' =>
'aTable',
37 'recordTypeValue' => 23,
39 'aField' =>
'notProcessedContent',
46 'enableRichtext' =>
true,
53 'tableName' =>
'aTable',
55 'recordTypeValue' => 23,
57 'aField' =>
'processedContent',
64 'enableRichtext' =>
true,
65 'richtextConfigurationName' =>
'',
66 'richtextConfiguration' => [
67 'aConfig' =>
'option',
75 $richtextConfigurationProphecy = $this->prophesize(Richtext::class);
76 GeneralUtility::addInstance(Richtext::class, $richtextConfigurationProphecy->reveal());
77 $rteHtmlParserPropehy = $this->prophesize(RteHtmlParser::class);
78 GeneralUtility::addInstance(RteHtmlParser::class, $rteHtmlParserPropehy->reveal());
80 $richtextConfigurationProphecy
88 'enableRichtext' =>
true,
91 ->willReturn([
'aConfig' =>
'option' ]);
92 $rteHtmlParserPropehy->init(
'aTable:aField', 42)->shouldBeCalled();
95 'notProcessedContent',
98 [
'aConfig' =>
'option']
100 ->willReturn(
'processedContent');
102 $this->assertSame($expected, (
new TcaText())->addData($input));