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