‪TYPO3CMS  ‪main
DirectoryNodeTest.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 
20 use PHPUnit\Framework\Attributes\Test;
31 
33 {
34  #[Test]
36  {
37  $this->expectException(InvalidArgumentException::class);
38  $this->expectExceptionCode(1366222203);
39  new ‪DirectoryNode([], null);
40  }
41 
42  #[Test]
44  {
45  $this->expectException(InvalidArgumentException::class);
46  $this->expectExceptionCode(1366226639);
47  $parent = $this->createMock(NodeInterface::class);
48  $structure = [
49  'name' => 'foo/bar',
50  ];
51  new ‪DirectoryNode($structure, $parent);
52  }
53 
54  #[Test]
56  {
57  $parent = $this->createMock(NodeInterface::class);
58  $node = $this->getMockBuilder(DirectoryNode::class)
59  ->onlyMethods(['createChildren'])
60  ->disableOriginalConstructor()
61  ->getMock();
62  $childArray = [
63  'foo',
64  ];
65  $structure = [
66  'name' => 'foo',
67  'children' => $childArray,
68  ];
69  $node->expects(self::once())->method('createChildren')->with($childArray);
70  $node->__construct($structure, $parent);
71  }
72 
73  #[Test]
74  public function ‪constructorSetsParent(): void
75  {
76  $parent = $this->createMock(NodeInterface::class);
77  $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false);
78  $structure = [
79  'name' => 'foo',
80  ];
81  $node->__construct($structure, $parent);
82  self::assertSame($parent, $node->_call('getParent'));
83  }
84 
85  #[Test]
86  public function ‪constructorSetsTargetPermission(): void
87  {
88  $parent = $this->createMock(NodeInterface::class);
89  $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false);
90  $targetPermission = '2550';
91  $structure = [
92  'name' => 'foo',
93  'targetPermission' => $targetPermission,
94  ];
95  $node->__construct($structure, $parent);
96  self::assertSame($targetPermission, $node->_call('getTargetPermission'));
97  }
98 
99  #[Test]
100  public function ‪constructorSetsName(): void
101  {
102  $parent = $this->createMock(RootNodeInterface::class);
103  $name = ‪StringUtility::getUniqueId('test_');
104  $node = new ‪DirectoryNode(['name' => $name], $parent);
105  self::assertSame($name, $node->getName());
106  }
107 
108  #[Test]
109  public function ‪getStatusReturnsArray(): void
110  {
111  $node = $this->getAccessibleMock(
112  DirectoryNode::class,
113  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
114  [],
115  '',
116  false
117  );
118  $path = $this->‪getTestDirectory('dir_');
119  $node->method('getAbsolutePath')->willReturn($path);
120  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
121  $node->method('exists')->willReturn(true);
122  $node->method('isDirectory')->willReturn(true);
123  $node->method('isPermissionCorrect')->willReturn(true);
124  $node->method('isWritable')->willReturn(true);
125  self::assertIsArray($node->getStatus());
126  }
127 
128  #[Test]
130  {
131  $node = $this->getAccessibleMock(
132  DirectoryNode::class,
133  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
134  [],
135  '',
136  false
137  );
138  $path = $this->‪getTestDirectory('dir_');
139  $node->method('getAbsolutePath')->willReturn($path);
140  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
141  $node->method('exists')->willReturn(false);
142  $node->method('isDirectory')->willReturn(false);
143  $node->method('isPermissionCorrect')->willReturn(false);
144  $node->method('isWritable')->willReturn(false);
145  $statusArray = $node->getStatus();
146  self::assertSame(ContextualFeedbackSeverity::WARNING, $statusArray[0]->getSeverity());
147  }
148 
149  #[Test]
151  {
152  $node = $this->getAccessibleMock(
153  DirectoryNode::class,
154  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
155  [],
156  '',
157  false
158  );
159  $path = $this->‪getTestFilePath('dir_');
160  touch($path);
161  $node->method('getAbsolutePath')->willReturn($path);
162  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
163  $node->method('exists')->willReturn(true);
164  $node->method('isDirectory')->willReturn(false);
165  $node->method('isPermissionCorrect')->willReturn(true);
166  $node->method('isWritable')->willReturn(true);
167  $statusArray = $node->getStatus();
168  self::assertSame(ContextualFeedbackSeverity::ERROR, $statusArray[0]->getSeverity());
169  }
170 
171  #[Test]
173  {
174  $node = $this->getAccessibleMock(
175  DirectoryNode::class,
176  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
177  [],
178  '',
179  false
180  );
181  $path = $this->‪getTestFilePath('dir_');
182  touch($path);
183  $node->method('getAbsolutePath')->willReturn($path);
184  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
185  $node->method('exists')->willReturn(true);
186  $node->method('isDirectory')->willReturn(true);
187  $node->method('isPermissionCorrect')->willReturn(true);
188  $node->method('isWritable')->willReturn(false);
189  $statusArray = $node->getStatus();
190  self::assertSame(ContextualFeedbackSeverity::ERROR, $statusArray[0]->getSeverity());
191  }
192 
193  #[Test]
195  {
196  $node = $this->getAccessibleMock(
197  DirectoryNode::class,
198  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
199  [],
200  '',
201  false
202  );
203  $path = $this->‪getTestFilePath('dir_');
204  touch($path);
205  $node->method('getAbsolutePath')->willReturn($path);
206  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
207  $node->method('exists')->willReturn(true);
208  $node->method('isDirectory')->willReturn(true);
209  $node->method('isPermissionCorrect')->willReturn(false);
210  $node->method('isWritable')->willReturn(true);
211  $statusArray = $node->getStatus();
212  self::assertSame(ContextualFeedbackSeverity::NOTICE, $statusArray[0]->getSeverity());
213  }
214 
215  #[Test]
217  {
218  $node = $this->getAccessibleMock(
219  DirectoryNode::class,
220  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
221  [],
222  '',
223  false
224  );
225  $path = $this->‪getTestFilePath('dir_');
226  touch($path);
227  $node->method('getAbsolutePath')->willReturn($path);
228  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
229  $node->method('exists')->willReturn(true);
230  $node->method('isDirectory')->willReturn(true);
231  $node->method('isPermissionCorrect')->willReturn(true);
232  $node->method('isWritable')->willReturn(true);
233  $statusArray = $node->getStatus();
234  self::assertSame(ContextualFeedbackSeverity::OK, $statusArray[0]->getSeverity());
235  }
236 
237  #[Test]
238  public function ‪getStatusCallsGetStatusOnChildren(): void
239  {
240  $node = $this->getAccessibleMock(
241  DirectoryNode::class,
242  ['exists', 'isDirectory', 'isPermissionCorrect', 'getRelativePathBelowSiteRoot', 'isWritable'],
243  [],
244  '',
245  false
246  );
247  $node->method('exists')->willReturn(true);
248  $node->method('isDirectory')->willReturn(true);
249  $node->method('isPermissionCorrect')->willReturn(true);
250  $node->method('isWritable')->willReturn(true);
251  $childMock1 = $this->createMock(NodeInterface::class);
252  $childMock1->expects(self::once())->method('getStatus')->willReturn([]);
253  $childMock2 = $this->createMock(NodeInterface::class);
254  $childMock2->expects(self::once())->method('getStatus')->willReturn([]);
255  $node->_set('children', [$childMock1, $childMock2]);
256  $node->getStatus();
257  }
258 
259  #[Test]
261  {
262  $node = $this->getAccessibleMock(
263  DirectoryNode::class,
264  ['exists', 'isDirectory', 'isPermissionCorrect', 'getRelativePathBelowSiteRoot', 'isWritable'],
265  [],
266  '',
267  false
268  );
269  $node->method('exists')->willReturn(true);
270  $node->method('isDirectory')->willReturn(true);
271  $node->method('isPermissionCorrect')->willReturn(true);
272  $node->method('isWritable')->willReturn(true);
273  $childMock = $this->createMock(NodeInterface::class);
274  $childMessage = new ‪FlashMessage('foo');
275  $childMock->expects(self::once())->method('getStatus')->willReturn([$childMessage]);
276  $node->_set('children', [$childMock]);
277  $status = $node->getStatus();
278  $statusOfDirectory = $status[0];
279  $statusOfChild = $status[1];
280  self::assertSame(ContextualFeedbackSeverity::OK, $statusOfDirectory->getSeverity());
281  self::assertSame($childMessage, $statusOfChild);
282  }
283 
284  #[Test]
286  {
287  $node = $this->getMockBuilder(DirectoryNode::class)
288  ->disableOriginalConstructor()
289  ->onlyMethods(['fixSelf'])
290  ->getMock();
291  $uniqueReturn = [‪StringUtility::getUniqueId('foo_')];
292  $node->expects(self::once())->method('fixSelf')->willReturn($uniqueReturn);
293  self::assertSame($uniqueReturn, $node->fix());
294  }
295 
296  #[Test]
298  {
299  $node = $this->getAccessibleMock(DirectoryNode::class, ['fixSelf'], [], '', false);
300  $uniqueReturnSelf = ‪StringUtility::getUniqueId('foo_');
301  $node->expects(self::once())->method('fixSelf')->willReturn([$uniqueReturnSelf]);
302 
303  $childMock1 = $this->createMock(NodeInterface::class);
304  $uniqueReturnChild1 = ‪StringUtility::getUniqueId('foo_');
305  $childMock1->expects(self::once())->method('fix')->willReturn([$uniqueReturnChild1]);
306 
307  $childMock2 = $this->createMock(NodeInterface::class);
308  $uniqueReturnChild2 = ‪StringUtility::getUniqueId('foo_');
309  $childMock2->expects(self::once())->method('fix')->willReturn([$uniqueReturnChild2]);
310 
311  $node->_set('children', [$childMock1, $childMock2]);
312 
313  self::assertSame([$uniqueReturnSelf, $uniqueReturnChild1, $uniqueReturnChild2], $node->fix());
314  }
315 
316  #[Test]
318  {
319  $node = $this->getAccessibleMock(
320  DirectoryNode::class,
321  ['exists', 'createDirectory', 'isPermissionCorrect'],
322  [],
323  '',
324  false
325  );
326  $node->expects(self::once())->method('exists')->willReturn(false);
327  $node->method('isPermissionCorrect')->willReturn(true);
328  $uniqueReturn = new ‪FlashMessage('foo');
329  $node->expects(self::once())->method('createDirectory')->willReturn($uniqueReturn);
330  self::assertSame([$uniqueReturn], $node->_call('fixSelf'));
331  }
332 
333  #[Test]
335  {
336  $node = $this->getAccessibleMock(
337  DirectoryNode::class,
338  ['exists', 'isWritable', 'getRelativePathBelowSiteRoot', 'isDirectory', 'getAbsolutePath'],
339  [],
340  '',
341  false
342  );
343  $node->method('exists')->willReturn(true);
344  $node->method('isWritable')->willReturn(true);
345  $node->method('isDirectory')->willReturn(false);
346  $node->method('getRelativePathBelowSiteRoot')->willReturn('');
347  $node->method('getAbsolutePath')->willReturn('');
348  $result = $node->_call('fixSelf');
349  self::assertSame(ContextualFeedbackSeverity::ERROR, $result[0]->getSeverity());
350  }
351 
352  #[Test]
354  {
355  $node = $this->getAccessibleMock(
356  DirectoryNode::class,
357  ['exists', 'isWritable', 'fixPermission'],
358  [],
359  '',
360  false
361  );
362  $node->method('exists')->willReturn(true);
363  $node->method('isWritable')->willReturn(false);
364  $message = new ‪FlashMessage('foo');
365  $node->expects(self::once())->method('fixPermission')->willReturn($message);
366  self::assertSame([$message], $node->_call('fixSelf'));
367  }
368 
369  #[Test]
371  {
372  $this->expectException(Exception::class);
373  $this->expectExceptionCode(1366740091);
374  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath'], [], '', false);
375  $node->expects(self::once())->method('getAbsolutePath')->willReturn('');
376  $node->expects(self::once())->method('exists')->willReturn(true);
377  $node->_call('createDirectory');
378  }
379 
380  #[Test]
381  public function ‪createDirectoryCreatesDirectory(): void
382  {
383  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath', 'getRelativePathBelowSiteRoot'], [], '', false);
384  $path = $this->‪getTestFilePath('dir_');
385  $node->expects(self::once())->method('exists')->willReturn(false);
386  $node->method('getAbsolutePath')->willReturn($path);
387  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
388  $node->_call('createDirectory');
389  self::assertDirectoryExists($path);
390  }
391 
392  #[Test]
394  {
395  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath', 'getRelativePathBelowSiteRoot'], [], '', false);
396  $path = $this->‪getTestFilePath('dir_');
397  $node->expects(self::once())->method('exists')->willReturn(false);
398  $node->method('getAbsolutePath')->willReturn($path);
399  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
400  self::assertSame(ContextualFeedbackSeverity::OK, $node->_call('createDirectory')->getSeverity());
401  }
402 
403  #[Test]
405  {
406  $this->expectException(InvalidArgumentException::class);
407  $this->expectExceptionCode(1366222204);
408  $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false);
409  $brokenStructure = [
410  [
411  'name' => 'foo',
412  ],
413  ];
414  $node->_call('createChildren', $brokenStructure);
415  }
416 
417  #[Test]
419  {
420  $this->expectException(InvalidArgumentException::class);
421  $this->expectExceptionCode(1366222205);
422  $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false);
423  $brokenStructure = [
424  [
425  'type' => 'foo',
426  ],
427  ];
428  $node->_call('createChildren', $brokenStructure);
429  }
430 
431  #[Test]
433  {
434  $this->expectException(InvalidArgumentException::class);
435  $this->expectExceptionCode(1366222206);
436  $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false);
437  $brokenStructure = [
438  [
439  'type' => DirectoryNode::class,
440  'name' => 'foo',
441  ],
442  [
443  'type' => DirectoryNode::class,
444  'name' => 'foo',
445  ],
446  ];
447  $node->_call('createChildren', $brokenStructure);
448  }
449 
450  #[Test]
451  public function ‪getChildrenReturnsCreatedChild(): void
452  {
453  $node = $this->getAccessibleMock(DirectoryNode::class, null, [], '', false);
454  $parent = $this->createMock(NodeInterface::class);
455  $childName = ‪StringUtility::getUniqueId('test_');
456  $structure = [
457  'name' => 'foo',
458  'type' => DirectoryNode::class,
459  'children' => [
460  [
461  'type' => DirectoryNode::class,
462  'name' => $childName,
463  ],
464  ],
465  ];
466  $node->__construct($structure, $parent);
467  $children = $node->_call('getChildren');
469  $child = $children[0];
470  self::assertInstanceOf(DirectoryNode::class, $children[0]);
471  self::assertSame($childName, $child->getName());
472  }
473 
474  #[Test]
476  {
477  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
478  $path = $this->‪getTestFilePath('dir_');
479  $node->method('getAbsolutePath')->willReturn($path);
480  self::assertFalse($node->isWritable());
481  }
482 
483  #[Test]
485  {
486  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
487  $path = $this->‪getTestDirectory('root_');
488  $node->method('getAbsolutePath')->willReturn($path);
489  self::assertTrue($node->isWritable());
490  }
491 
492  #[Test]
494  {
495  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
496  $path = $this->‪getTestDirectory('dir_');
497  $node->method('getAbsolutePath')->willReturn($path);
498  self::assertTrue($node->_call('isDirectory'));
499  }
500 
501  #[Test]
503  {
504  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
505  $testRoot = ‪Environment::getVarPath() . '/tests/';
506  $this->testFilesToDelete[] = $testRoot;
507  $path = $testRoot . ‪StringUtility::getUniqueId('root_');
509  $link = ‪StringUtility::getUniqueId('link_');
511  mkdir($path . '/' . ‪$dir);
512  symlink($path . '/' . ‪$dir, $path . '/' . $link);
513  $node->method('getAbsolutePath')->willReturn($path . '/' . $link);
514  self::assertFalse($node->_call('isDirectory'));
515  }
516 }
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithOkStatusIfDirectoryExistsAndPermissionAreCorrect
‪getStatusReturnsArrayWithOkStatusIfDirectoryExistsAndPermissionAreCorrect()
Definition: DirectoryNodeTest.php:216
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractFolderStructureTestCase\getTestDirectory
‪getTestDirectory($prefix='root_')
Definition: AbstractFolderStructureTestCase.php:33
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithWarningStatusIfDirectoryNotExists
‪getStatusReturnsArrayWithWarningStatusIfDirectoryNotExists()
Definition: DirectoryNodeTest.php:129
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorSetsParent
‪constructorSetsParent()
Definition: DirectoryNodeTest.php:74
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createChildrenThrowsExceptionIfAChildNameIsNotSet
‪createChildrenThrowsExceptionIfAChildNameIsNotSet()
Definition: DirectoryNodeTest.php:418
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithOwnStatusAndStatusOfChild
‪getStatusReturnsArrayWithOwnStatusAndStatusOfChild()
Definition: DirectoryNodeTest.php:260
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixCallsFixOnChildrenAndReturnsMergedResult
‪fixCallsFixOnChildrenAndReturnsMergedResult()
Definition: DirectoryNodeTest.php:297
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isDirectoryReturnsTrueIfNameIsADirectory
‪isDirectoryReturnsTrueIfNameIsADirectory()
Definition: DirectoryNodeTest.php:493
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractFolderStructureTestCase\getTestFilePath
‪non empty string getTestFilePath($prefix='file_')
Definition: AbstractFolderStructureTestCase.php:48
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorSetsTargetPermission
‪constructorSetsTargetPermission()
Definition: DirectoryNodeTest.php:86
‪TYPO3\CMS\Install\FolderStructure\RootNodeInterface
Definition: RootNodeInterface.php:21
‪$dir
‪$dir
Definition: validateRstFiles.php:257
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusCallsGetStatusOnChildren
‪getStatusCallsGetStatusOnChildren()
Definition: DirectoryNodeTest.php:238
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorThrowsExceptionIfNameContainsForwardSlash
‪constructorThrowsExceptionIfNameContainsForwardSlash()
Definition: DirectoryNodeTest.php:43
‪TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep
‪static mkdir_deep(string $directory)
Definition: GeneralUtility.php:1654
‪TYPO3\CMS\Install\FolderStructure\DirectoryNode
Definition: DirectoryNode.php:28
‪TYPO3\CMS\Core\Core\Environment\getVarPath
‪static getVarPath()
Definition: Environment.php:197
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createChildrenThrowsExceptionIfAChildTypeIsNotSet
‪createChildrenThrowsExceptionIfAChildTypeIsNotSet()
Definition: DirectoryNodeTest.php:404
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorCallsCreateChildrenIfChildrenAreSet
‪constructorCallsCreateChildrenIfChildrenAreSet()
Definition: DirectoryNodeTest.php:55
‪TYPO3\CMS\Core\Type\ContextualFeedbackSeverity
‪ContextualFeedbackSeverity
Definition: ContextualFeedbackSeverity.php:25
‪TYPO3\CMS\Install\FolderStructure\Exception\InvalidArgumentException
Definition: InvalidArgumentException.php:23
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorThrowsExceptionIfParentIsNull
‪constructorThrowsExceptionIfParentIsNull()
Definition: DirectoryNodeTest.php:35
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\AbstractFolderStructureTestCase
Definition: AbstractFolderStructureTestCase.php:26
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixCallsFixSelfAndReturnsItsResult
‪fixCallsFixSelfAndReturnsItsResult()
Definition: DirectoryNodeTest.php:285
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure
Definition: AbstractFolderStructureTestCase.php:18
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getChildrenReturnsCreatedChild
‪getChildrenReturnsCreatedChild()
Definition: DirectoryNodeTest.php:451
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixSelfCallsFixPermissionIfDirectoryExistsButIsNotWritable
‪fixSelfCallsFixPermissionIfDirectoryExistsButIsNotWritable()
Definition: DirectoryNodeTest.php:353
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithErrorStatusIfNodeIsNotADirectory
‪getStatusReturnsArrayWithErrorStatusIfNodeIsNotADirectory()
Definition: DirectoryNodeTest.php:150
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorSetsName
‪constructorSetsName()
Definition: DirectoryNodeTest.php:100
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArray
‪getStatusReturnsArray()
Definition: DirectoryNodeTest.php:109
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsTrueIfNodeExistsAndFileCanBeCreated
‪isWritableReturnsTrueIfNodeExistsAndFileCanBeCreated()
Definition: DirectoryNodeTest.php:484
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixSelfReturnsErrorStatusIfNodeExistsButIsNotADirectoryAndReturnsResult
‪fixSelfReturnsErrorStatusIfNodeExistsButIsNotADirectoryAndReturnsResult()
Definition: DirectoryNodeTest.php:334
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryReturnsOkStatusIfDirectoryWasCreated
‪createDirectoryReturnsOkStatusIfDirectoryWasCreated()
Definition: DirectoryNodeTest.php:393
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest
Definition: DirectoryNodeTest.php:33
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:27
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryCreatesDirectory
‪createDirectoryCreatesDirectory()
Definition: DirectoryNodeTest.php:381
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isDirectoryReturnsFalseIfNameIsALinkToADirectory
‪isDirectoryReturnsFalseIfNameIsALinkToADirectory()
Definition: DirectoryNodeTest.php:502
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryThrowsExceptionIfNodeExists
‪createDirectoryThrowsExceptionIfNodeExists()
Definition: DirectoryNodeTest.php:370
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithNoticeStatusIfDirectoryExistsButPermissionAreNotCorrect
‪getStatusReturnsArrayWithNoticeStatusIfDirectoryExistsButPermissionAreNotCorrect()
Definition: DirectoryNodeTest.php:194
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createChildrenThrowsExceptionForMultipleChildrenWithSameName
‪createChildrenThrowsExceptionForMultipleChildrenWithSameName()
Definition: DirectoryNodeTest.php:432
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:41
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:24
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsFalseIfNodeDoesNotExist
‪isWritableReturnsFalseIfNodeDoesNotExist()
Definition: DirectoryNodeTest.php:475
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithErrorStatusIfDirectoryExistsButIsNotWritable
‪getStatusReturnsArrayWithErrorStatusIfDirectoryExistsButIsNotWritable()
Definition: DirectoryNodeTest.php:172
‪TYPO3\CMS\Install\FolderStructure\NodeInterface
Definition: NodeInterface.php:24
‪TYPO3\CMS\Install\FolderStructure\Exception
Definition: InvalidArgumentException.php:16
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixSelfCallsCreateDirectoryIfDirectoryDoesNotExistAndReturnsResult
‪fixSelfCallsCreateDirectoryIfDirectoryDoesNotExistAndReturnsResult()
Definition: DirectoryNodeTest.php:317
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static getUniqueId(string $prefix='')
Definition: StringUtility.php:57