2 namespace TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider;
17 use Prophecy\Argument;
18 use Prophecy\Prophecy\ObjectProphecy;
21 use TYPO3\CMS\Core\Tests\UnitTestCase;
40 $this->dbProphecy = $this->prophesize(DatabaseConnection::class);
41 $GLOBALS[
'TYPO3_DB'] = $this->dbProphecy->reveal();
51 $this->dbProphecy->exec_SELECTgetRows(Argument::cetera())->willReturn(null);
52 $this->dbProphecy->sql_error(Argument::cetera())->willReturn(null);
53 $this->setExpectedException(\UnexpectedValueException::class, $this->anything(), 1440777705);
54 $this->subject->addData([]);
63 'effectivePid' =>
'23',
66 $expected[
'pageLanguageOverlayRows'] = [
70 'sys_language_uid' =>
'2',
73 $this->dbProphecy->exec_SELECTgetRows(
'*',
'pages_language_overlay',
'pid=23')
75 ->willReturn($expected[
'pageLanguageOverlayRows']);
76 $this->assertSame($expected, $this->subject->addData($input));