‪TYPO3CMS  9.5
StructureFacadeTest.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 
20 use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
21 use TYPO3\TestingFramework\Core\Unit\UnitTestCase;
22 
26 class ‪StructureFacadeTest extends UnitTestCase
27 {
32  {
34  $facade = $this->getAccessibleMock(StructureFacade::class, ['dummy'], [], '', false);
35  $root = $this->createMock(RootNode::class);
36  $root->expects($this->once())->method('getStatus')->will($this->returnValue([]));
37  $facade->_set('structure', $root);
38  $status = $facade->getStatus();
39  $this->assertInstanceOf(FlashMessageQueue::class, $status);
40  }
41 
46  {
48  $facade = $this->getAccessibleMock(StructureFacade::class, ['dummy'], [], '', false);
49  $root = $this->createMock(RootNode::class);
50  $root->expects($this->once())->method('fix')->will($this->returnValue([]));
51  $facade->_set('structure', $root);
52  $status = $facade->fix();
53  $this->assertInstanceOf(FlashMessageQueue::class, $status);
54  }
55 }
‪TYPO3\CMS\Install\FolderStructure\StructureFacade
Definition: StructureFacade.php:25
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\StructureFacadeTest
Definition: StructureFacadeTest.php:27
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\StructureFacadeTest\fixCallsFixOfStructureAndReturnsItsResult
‪fixCallsFixOfStructureAndReturnsItsResult()
Definition: StructureFacadeTest.php:45
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure
Definition: AbstractNodeTest.php:2
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\StructureFacadeTest\getStatusReturnsStatusOfStructureAndReturnsItsResult
‪getStatusReturnsStatusOfStructureAndReturnsItsResult()
Definition: StructureFacadeTest.php:31
‪TYPO3\CMS\Install\FolderStructure\RootNode
Definition: RootNode.php:24
‪TYPO3\CMS\Core\Messaging\FlashMessageQueue
Definition: FlashMessageQueue.php:25