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