‪TYPO3CMS  9.5
UserTsConfigTest.php
Go to the documentation of this file.
1 <?php
3 
4 /*
5  * This file is part of the TYPO3 CMS project.
6  *
7  * It is free software; you can redistribute it and/or modify it under
8  * the terms of the GNU General Public License, either version 2
9  * of the License, or any later version.
10  *
11  * For the full copyright and license information, please read the
12  * LICENSE.txt file that was distributed with this source code.
13  *
14  * The TYPO3 project - inspiring people to share!
15  */
16 
19 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
20 
24 class ‪UserTsConfigTest extends UnitTestCase
25 {
29  protected ‪$subject;
30 
31  protected function ‪setUp()
32  {
33  $this->subject = new ‪UserTsConfig();
34  }
35 
39  public function ‪addDataSetsUserTypoScriptInResult()
40  {
41  $expected = ['foo'];
42  $backendUserAuthenticationProphecy = $this->prophesize(BackendUserAuthentication::class);
43  $backendUserAuthenticationProphecy->getTSConfig()->willReturn($expected);
44  ‪$GLOBALS['BE_USER'] = $backendUserAuthenticationProphecy->reveal();
45  $result = $this->subject->addData([]);
46  $this->assertEquals($expected, $result['userTsConfig']);
47  }
48 }
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\UserTsConfigTest
Definition: UserTsConfigTest.php:25
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\UserTsConfigTest\addDataSetsUserTypoScriptInResult
‪addDataSetsUserTypoScriptInResult()
Definition: UserTsConfigTest.php:38
‪TYPO3\CMS\Backend\Form\FormDataProvider\UserTsConfig
Definition: UserTsConfig.php:24
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:45
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\UserTsConfigTest\setUp
‪setUp()
Definition: UserTsConfigTest.php:30
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider\UserTsConfigTest\$subject
‪UserTsConfig $subject
Definition: UserTsConfigTest.php:28
‪TYPO3\CMS\Backend\Tests\Unit\Form\FormDataProvider
Definition: DatabaseDefaultLanguagePageRowTest.php:3