‪TYPO3CMS  10.4
DatabasePageLanguageOverlayRowsTest.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
20 
24 class ‪DatabasePageLanguageOverlayRowsTest extends UnitTestCase
25 {
29  protected ‪$subject;
30 
31  protected function ‪setUp(): void
32  {
33  $this->subject = $this->getMockBuilder(DatabasePageLanguageOverlayRows::class)
34  ->setMethods(['getDatabaseRows'])
35  ->getMock();
36  }
37 
42  {
43  $input = [
44  'effectivePid' => '23',
45  ];
46  $expected = $input;
47  $expected['pageLanguageOverlayRows'] = [
48  0 => [
49  'uid' => '1',
50  'pid' => '42',
51  'sys_language_uid' => '2',
52  ],
53  ];
54  $this->subject->expects(self::once())
55  ->method('getDatabaseRows')
56  ->willReturn($expected['pageLanguageOverlayRows']);
57 
58  self::assertSame($expected, $this->subject->addData($input));
59  }
60 }
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\DatabasePageLanguageOverlayRowsTest\setUp
‪setUp()
Definition: DatabasePageLanguageOverlayRowsTest.php:30
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\DatabasePageLanguageOverlayRowsTest\$subject
‪DatabasePageLanguageOverlayRows PHPUnit Framework MockObject MockObject $subject
Definition: DatabasePageLanguageOverlayRowsTest.php:28
‪TYPO3\CMS\Backend\Form\FormDataProvider\DatabasePageLanguageOverlayRows
Definition: DatabasePageLanguageOverlayRows.php:29
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\DatabasePageLanguageOverlayRowsTest\addDataSetsPageLanguageOverlayRows
‪addDataSetsPageLanguageOverlayRows()
Definition: DatabasePageLanguageOverlayRowsTest.php:40
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\DatabasePageLanguageOverlayRowsTest
Definition: DatabasePageLanguageOverlayRowsTest.php:25
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider
Definition: DatabaseDefaultLanguagePageRowTest.php:18