2 namespace TYPO3\CMS\Recordlist\Tests\Unit\RecordList;
17 use TYPO3\CMS\Core\Tests\UnitTestCase;
18 use TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRecordList;
31 public function setTableDisplayOrderConvertsStringInput(array $input, array $expected)
34 $subject = $this->getAccessibleMock(AbstractDatabaseRecordList::class, [
'dummy']);
35 $subject->setTableDisplayOrder($input);
36 $this->assertSame($expected, $subject->_get(
'tableDisplayOrder'));
45 'no information at all' => [
49 'string in before' => [
52 'before' =>
'tableB, tableC'
57 'before' => [
'tableB',
'tableC']
61 'array is preserved in before' => [
64 'before' => [
'tableB',
'tableC']
69 'before' => [
'tableB',
'tableC']
73 'array is preserved in before, after is modified' => [
76 'before' => [
'tableB',
'tableC'],
82 'before' => [
'tableB',
'tableC'],
98 'table' => [
'after' => new \stdClass ]
101 $subject->setTableDisplayOrder($test);
113 'table' => [
'before' => new \stdClass ]
116 $subject->setTableDisplayOrder($test);