2 declare(strict_types = 1);
21 use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
22 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
38 $subject = $this->getAccessibleMock(AbstractDatabaseRecordList::class, [
'dummy'], [],
'',
false);
39 $subject->setTableDisplayOrder($input);
40 $this->assertSame($expected, $subject->_get(
'tableDisplayOrder'));
49 'no information at all' => [
53 'string in before' => [
56 'before' =>
'tableB, tableC'
61 'before' => [
'tableB',
'tableC']
65 'array is preserved in before' => [
68 'before' => [
'tableB',
'tableC']
73 'before' => [
'tableB',
'tableC']
77 'array is preserved in before, after is modified' => [
80 'before' => [
'tableB',
'tableC'],
86 'before' => [
'tableB',
'tableC'],
99 $iconFactoryProphecy = $this->prophesize(IconFactory::class);
100 GeneralUtility::addInstance(IconFactory::class, $iconFactoryProphecy->reveal());
102 $this->expectException(\UnexpectedValueException::class);
103 $this->expectExceptionCode(1436195934);
105 'table' => [
'after' => new \stdClass ]
108 $subject->setTableDisplayOrder($test);
116 $iconFactoryProphecy = $this->prophesize(IconFactory::class);
117 GeneralUtility::addInstance(IconFactory::class, $iconFactoryProphecy->reveal());
119 $this->expectException(\UnexpectedValueException::class);
120 $this->expectExceptionCode(1436195933);
122 'table' => [
'before' => new \stdClass ]
125 $subject->setTableDisplayOrder($test);