2 declare(strict_types = 1);
18 use Prophecy\Argument;
22 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
34 $nodeFactoryProphecy = $this->prophesize(NodeFactory::class);
35 $paletteAndSingleContainerProphecy = $this->prophesize(PaletteAndSingleContainer::class);
36 $paletteAndSingleContainerProphecy->render(Argument::cetera())->shouldBeCalled()->willReturn(
'');
39 'tableName' =>
'aTable',
40 'recordTypeValue' =>
'aType',
44 'showitem' =>
'aField',
48 'fieldListToRender' =>
'aField',
52 $expected[
'renderType'] =
'paletteAndSingleContainer';
55 $expected[
'fieldsArray'] = [
59 $nodeFactoryProphecy->create($expected)->willReturn($paletteAndSingleContainerProphecy->reveal());
68 $nodeFactoryProphecy = $this->prophesize(NodeFactory::class);
69 $paletteAndSingleContainerProphecy = $this->prophesize(PaletteAndSingleContainer::class);
70 $paletteAndSingleContainerProphecy->render(Argument::cetera())->shouldBeCalled()->willReturn(
'');
73 'tableName' =>
'aTable',
74 'recordTypeValue' =>
'aType',
78 'showitem' =>
'aField, bField;bLabel, cField',
82 'fieldListToRender' =>
'aField, bField, aField',
86 $expected[
'renderType'] =
'paletteAndSingleContainer';
88 $expected[
'fieldsArray'] = [
93 $nodeFactoryProphecy->create($expected)->willReturn($paletteAndSingleContainerProphecy->reveal());
102 $nodeFactoryProphecy = $this->prophesize(NodeFactory::class);
103 $paletteAndSingleContainerProphecy = $this->prophesize(PaletteAndSingleContainer::class);
104 $paletteAndSingleContainerProphecy->render(Argument::cetera())->shouldBeCalled()->willReturn(
'');
107 'tableName' =>
'aTable',
108 'recordTypeValue' =>
'aType',
112 'showitem' =>
'--palette--;;aPalette, --palette--;;anotherPalette',
117 'showitem' =>
'aField',
119 'anotherPalette' => [
120 'showitem' =>
'bField;bLabel, cField',
124 'fieldListToRender' =>
'aField, bField',
128 $expected[
'renderType'] =
'paletteAndSingleContainer';
130 $expected[
'fieldsArray'] = [
135 $nodeFactoryProphecy->create($expected)->willReturn($paletteAndSingleContainerProphecy->reveal());
144 $nodeFactoryProphecy = $this->prophesize(NodeFactory::class);
145 $paletteAndSingleContainerProphecy = $this->prophesize(PaletteAndSingleContainer::class);
146 $paletteAndSingleContainerProphecy->render(Argument::cetera())->shouldBeCalled()->willReturn(
'');
149 'tableName' =>
'aTable',
150 'recordTypeValue' =>
'aType',
154 'showitem' =>
'--palette--;;aPalette',
159 'showitem' =>
'aField',
163 'fieldListToRender' =>
'aField, iDontExist',
167 $expected[
'renderType'] =
'paletteAndSingleContainer';
169 $expected[
'fieldsArray'] = [
173 $nodeFactoryProphecy->create($expected)->willReturn($paletteAndSingleContainerProphecy->reveal());