‪TYPO3CMS  11.5
StructureFacadeTest.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
23 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
24 
28 class ‪StructureFacadeTest extends UnitTestCase
29 {
34  {
35  $facade = $this->getAccessibleMock(StructureFacade::class, ['dummy'], [], '', false);
36  $root = $this->createMock(RootNode::class);
37  $root->expects(self::once())->method('getStatus')->willReturn([]);
38  $facade->_set('structure', $root);
39  $status = $facade->getStatus();
40  self::assertInstanceOf(FlashMessageQueue::class, $status);
41  }
42 
47  {
48  $facade = $this->getAccessibleMock(StructureFacade::class, ['dummy'], [], '', false);
49  $root = $this->createMock(RootNode::class);
50  $root->expects(self::once())->method('fix')->willReturn([]);
51  $facade->_set('structure', $root);
52  $status = $facade->fix();
53  self::assertInstanceOf(FlashMessageQueue::class, $status);
54  }
55 }
‪TYPO3\CMS\Install\FolderStructure\StructureFacade
Definition: StructureFacade.php:26
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\StructureFacadeTest
Definition: StructureFacadeTest.php:29
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\StructureFacadeTest\fixCallsFixOfStructureAndReturnsItsResult
‪fixCallsFixOfStructureAndReturnsItsResult()
Definition: StructureFacadeTest.php:46
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure
Definition: AbstractNodeTest.php:18
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\StructureFacadeTest\getStatusReturnsStatusOfStructureAndReturnsItsResult
‪getStatusReturnsStatusOfStructureAndReturnsItsResult()
Definition: StructureFacadeTest.php:33
‪TYPO3\CMS\Install\FolderStructure\RootNode
Definition: RootNode.php:27
‪TYPO3\CMS\Core\Messaging\FlashMessageQueue
Definition: FlashMessageQueue.php:29