‪TYPO3CMS  9.5
Typo3StatusTest.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 
17 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
18 
22 class ‪Typo3StatusTest extends UnitTestCase
23 {
27  protected function ‪setUp()
28  {
29  ‪$GLOBALS['LANG'] = $this->createMock(\‪TYPO3\CMS\Core\Localization\LanguageService::class);
30  }
31 
36  {
37  ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'] = [];
38  $fixture = new \TYPO3\CMS\Reports\Report\Status\Typo3Status;
39  $result = $fixture->getStatus();
40  $statusObject = $result['registeredXclass'];
41  $this->assertSame(\‪TYPO3\CMS\Reports\‪Status::OK, $statusObject->getSeverity());
42  }
43 
48  {
49  ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['Objects'] = [
50  'foo' => [
51  'className' => 'bar',
52  ]
53  ];
54  $fixture = new \TYPO3\CMS\Reports\Report\Status\Typo3Status;
55  $result = $fixture->getStatus();
56  $statusObject = $result['registeredXclass'];
57  $this->assertSame(\‪TYPO3\CMS\Reports\‪Status::NOTICE, $statusObject->getSeverity());
58  }
59 }
‪TYPO3\CMS\Reports\Tests\Unit\Report\Status\Typo3StatusTest\getStatusReturnsXclassStatusObjectWithSeverityOkIfNoXclassExists
‪getStatusReturnsXclassStatusObjectWithSeverityOkIfNoXclassExists()
Definition: Typo3StatusTest.php:35
‪TYPO3\CMS\Reports\Status\NOTICE
‪const NOTICE
Definition: Status.php:23
‪TYPO3
‪TYPO3\CMS\Reports\Tests\Unit\Report\Status\Typo3StatusTest\setUp
‪setUp()
Definition: Typo3StatusTest.php:27
‪TYPO3\CMS\Reports\Tests\Unit\Report\Status\Typo3StatusTest
Definition: Typo3StatusTest.php:23
‪TYPO3\CMS\Reports\Status\OK
‪const OK
Definition: Status.php:25
‪TYPO3\CMS\Reports\Tests\Unit\Report\Status\Typo3StatusTest\getStatusReturnsXclassStatusObjectWithSeverityNoticeIfXclassExists
‪getStatusReturnsXclassStatusObjectWithSeverityNoticeIfXclassExists()
Definition: Typo3StatusTest.php:47
‪TYPO3\CMS\Reports\Tests\Unit\Report\Status
Definition: Typo3StatusTest.php:2
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5