17 use Prophecy\Prophecy\ObjectProphecy;
20 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
32 protected function setUp()
34 $this->beUserProphecy = $this->prophesize(BackendUserAuthentication::class);
35 $GLOBALS[
'BE_USER'] = $this->beUserProphecy->reveal();
49 'foreign_table' =>
'aForeignTableName',
54 'inlineFirstPid' => 0,
60 $input[
'processedTca'][
'columns'][
'aField'][
'config'][
'foreign_table']
66 $expected[
'processedTca'][
'columns'][
'aField'][
'children'] = [];
67 $this->assertEquals($expected, (
new TcaInline)->addData($input));
81 'foreign_table' =>
'aForeignTableName',
86 'inlineFirstPid' => 0,
92 $input[
'processedTca'][
'columns'][
'aField'][
'config'][
'foreign_table']
94 ->shouldNotBeCalled();
97 $expected[
'processedTca'][
'columns'][
'aField'][
'config'][
'type'] =
'input';
98 $this->assertEquals($expected, (
new TcaInline)->addData($input));
112 'foreign_table' =>
'aForeignTableName',
117 'inlineFirstPid' => 0,
118 'inlineResolveExistingChildren' =>
false,
121 $this->beUserProphecy
124 $input[
'processedTca'][
'columns'][
'aField'][
'config'][
'foreign_table']
130 $expected[
'processedTca'][
'columns'][
'aField'][
'children'] = [];
131 $this->assertEquals($expected, (
new TcaInline)->addData($input));