[TASK] Deprecate further l10n_mode usages
[Packages/TYPO3.CMS.git] / typo3 / sysext / backend / Tests / Unit / Utility / BackendUtilityTest.php
index 25ca894..cadd2d0 100644 (file)
@@ -905,93 +905,6 @@ class BackendUtilityTest extends \TYPO3\TestingFramework\Core\Unit\UnitTestCase
     }
 
     /**
-     * Data provider for replaceL10nModeFieldsReplacesFields
-     *
-     * @return array
-     */
-    public function replaceL10nModeFieldsReplacesFieldsDataProvider()
-    {
-        return [
-            'same table: exclude' => [
-                'foo',
-                [
-                    'origUid' => 1,
-                    'field2' => 'fdas',
-                    'field3' => 'trans',
-                ],
-                [
-                    'foo' => [
-                        'ctrl' => [
-                            'transOrigPointerField' => 'origUid'
-                        ],
-                        'columns' => [
-                            'field2' => ['l10n_mode' => 'exclude'],
-                            'field3' => ['l10n_mode' => 'exclude']
-                        ]
-                    ]
-                ],
-                [
-                    'origUid' => 0,
-                    'field2' => 'basic',
-                    'field3' => '',
-                ],
-                [
-                    'origUid' => 1,
-                    'field2' => 'basic',
-                    'field3' => '',
-                ]
-            ],
-        ];
-    }
-
-    /**
-     * @test
-     * @dataProvider replaceL10nModeFieldsReplacesFieldsDataProvider
-     *
-     * @param string $table
-     * @param array $row
-     * @param array $tca
-     * @param array $originalRow
-     * @param array $expected
-     *
-     * @throws \InvalidArgumentException
-     * @throws \PHPUnit_Framework_Exception
-     */
-    public function replaceL10nModeFieldsReplacesFields($table, array $row, array $tca, array $originalRow, $expected)
-    {
-        $tableName = $table === 'pages_language_overlay' ? 'pages' : $table;
-
-        list($queryBuilderProphet, $connectionPoolProphet) = $this->mockDatabaseConnection($tableName);
-
-        $statementProphet = $this->prophesize(\Doctrine\DBAL\Driver\Statement::class);
-        $statementProphet->fetch()->willReturn($originalRow, false);
-
-        $queryBuilderProphet->select('*')
-            ->shouldBeCalled()
-            ->willReturn($queryBuilderProphet->reveal());
-        $queryBuilderProphet->from($tableName)
-            ->shouldBeCalled()
-            ->willReturn($queryBuilderProphet->reveal());
-        $queryBuilderProphet->where('`uid` = 1')
-            ->shouldBeCalled()
-            ->willReturn($queryBuilderProphet->reveal());
-        $queryBuilderProphet->createNamedParameter(Argument::cetera())
-            ->shouldBeCalled()
-            ->willReturnArgument(0);
-        $queryBuilderProphet->execute()
-            ->shouldBeCalled()
-            ->willReturn($statementProphet->reveal());
-
-        GeneralUtility::addInstance(ConnectionPool::class, $connectionPoolProphet->reveal());
-
-        $GLOBALS['TCA'] = $tca;
-
-        /** @var \PHPUnit_Framework_MockObject_MockObject|\TYPO3\TestingFramework\Core\AccessibleObjectInterface|BackendUtility $subject */
-        $subject = $this->getAccessibleMock(BackendUtility::class, ['dummy']);
-        $this->assertSame($expected, $subject->_call('replaceL10nModeFields', $table, $row));
-    }
-
-    /**
      * @test
      */
     public function getSpecConfPartsSplitsDefaultExtras()