‪TYPO3CMS  10.4
DirectoryNodeTest.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 
28 use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
29 
34 {
39  {
40  $this->expectException(InvalidArgumentException::class);
41  $this->expectExceptionCode(1366222203);
42  new ‪DirectoryNode([], null);
43  }
44 
49  {
50  $this->expectException(InvalidArgumentException::class);
51  $this->expectExceptionCode(1366226639);
52  $parent = $this->createMock(NodeInterface::class);
53  $structure = [
54  'name' => 'foo/bar',
55  ];
56  new ‪DirectoryNode($structure, $parent);
57  }
58 
63  {
64  $parent = $this->createMock(NodeInterface::class);
66  $node = $this->getMockBuilder(DirectoryNode::class)
67  ->setMethods(['createChildren'])
68  ->disableOriginalConstructor()
69  ->getMock();
70  $childArray = [
71  'foo',
72  ];
73  $structure = [
74  'name' => 'foo',
75  'children' => $childArray,
76  ];
77  $node->expects(self::once())->method('createChildren')->with($childArray);
78  $node->__construct($structure, $parent);
79  }
80 
84  public function ‪constructorSetsParent(): void
85  {
86  $parent = $this->createMock(NodeInterface::class);
88  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
89  $structure = [
90  'name' => 'foo',
91  ];
92  $node->__construct($structure, $parent);
93  self::assertSame($parent, $node->_call('getParent'));
94  }
95 
99  public function ‪constructorSetsTargetPermission(): void
100  {
101  $parent = $this->createMock(NodeInterface::class);
103  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
104  $targetPermission = '2550';
105  $structure = [
106  'name' => 'foo',
107  'targetPermission' => $targetPermission,
108  ];
109  $node->__construct($structure, $parent);
110  self::assertSame($targetPermission, $node->_call('getTargetPermission'));
111  }
112 
116  public function ‪constructorSetsName(): void
117  {
118  $parent = $this->createMock(RootNodeInterface::class);
119  $name = ‪StringUtility::getUniqueId('test_');
120  $node = new ‪DirectoryNode(['name' => $name], $parent);
121  self::assertSame($name, $node->getName());
122  }
123 
127  public function ‪getStatusReturnsArray(): void
128  {
130  $node = $this->getAccessibleMock(
131  DirectoryNode::class,
132  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
133  [],
134  '',
135  false
136  );
137  $path = $this->‪getVirtualTestDir('dir_');
138  $node->method('getAbsolutePath')->willReturn($path);
139  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
140  $node->method('exists')->willReturn(true);
141  $node->method('isDirectory')->willReturn(true);
142  $node->method('isPermissionCorrect')->willReturn(true);
143  $node->method('isWritable')->willReturn(true);
144  self::assertIsArray($node->getStatus());
145  }
146 
151  {
153  $node = $this->getAccessibleMock(
154  DirectoryNode::class,
155  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
156  [],
157  '',
158  false
159  );
160  $path = $this->‪getVirtualTestDir('dir_');
161  $node->method('getAbsolutePath')->willReturn($path);
162  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
163  $node->method('exists')->willReturn(false);
164  $node->method('isDirectory')->willReturn(false);
165  $node->method('isPermissionCorrect')->willReturn(false);
166  $node->method('isWritable')->willReturn(false);
167  $statusArray = $node->getStatus();
168  self::assertSame(‪FlashMessage::WARNING, $statusArray[0]->getSeverity());
169  }
170 
175  {
177  $node = $this->getAccessibleMock(
178  DirectoryNode::class,
179  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
180  [],
181  '',
182  false
183  );
184  $path = $this->‪getVirtualTestFilePath('dir_');
185  touch($path);
186  $node->method('getAbsolutePath')->willReturn($path);
187  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
188  $node->method('exists')->willReturn(true);
189  $node->method('isDirectory')->willReturn(false);
190  $node->method('isPermissionCorrect')->willReturn(true);
191  $node->method('isWritable')->willReturn(true);
192  $statusArray = $node->getStatus();
193  self::assertSame(‪FlashMessage::ERROR, $statusArray[0]->getSeverity());
194  }
195 
200  {
202  $node = $this->getAccessibleMock(
203  DirectoryNode::class,
204  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
205  [],
206  '',
207  false
208  );
209  $path = $this->‪getVirtualTestFilePath('dir_');
210  touch($path);
211  $node->method('getAbsolutePath')->willReturn($path);
212  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
213  $node->method('exists')->willReturn(true);
214  $node->method('isDirectory')->willReturn(true);
215  $node->method('isPermissionCorrect')->willReturn(true);
216  $node->method('isWritable')->willReturn(false);
217  $statusArray = $node->getStatus();
218  self::assertSame(‪FlashMessage::ERROR, $statusArray[0]->getSeverity());
219  }
220 
225  {
227  $node = $this->getAccessibleMock(
228  DirectoryNode::class,
229  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
230  [],
231  '',
232  false
233  );
234  $path = $this->‪getVirtualTestFilePath('dir_');
235  touch($path);
236  $node->method('getAbsolutePath')->willReturn($path);
237  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
238  $node->method('exists')->willReturn(true);
239  $node->method('isDirectory')->willReturn(true);
240  $node->method('isPermissionCorrect')->willReturn(false);
241  $node->method('isWritable')->willReturn(true);
242  $statusArray = $node->getStatus();
243  self::assertSame(‪FlashMessage::NOTICE, $statusArray[0]->getSeverity());
244  }
245 
250  {
252  $node = $this->getAccessibleMock(
253  DirectoryNode::class,
254  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
255  [],
256  '',
257  false
258  );
259  $path = $this->‪getVirtualTestFilePath('dir_');
260  touch($path);
261  $node->method('getAbsolutePath')->willReturn($path);
262  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
263  $node->method('exists')->willReturn(true);
264  $node->method('isDirectory')->willReturn(true);
265  $node->method('isPermissionCorrect')->willReturn(true);
266  $node->method('isWritable')->willReturn(true);
267  $statusArray = $node->getStatus();
268  self::assertSame(‪FlashMessage::OK, $statusArray[0]->getSeverity());
269  }
270 
274  public function ‪getStatusCallsGetStatusOnChildren(): void
275  {
277  $node = $this->getAccessibleMock(
278  DirectoryNode::class,
279  ['exists', 'isDirectory', 'isPermissionCorrect', 'getRelativePathBelowSiteRoot', 'isWritable'],
280  [],
281  '',
282  false
283  );
284  $node->method('exists')->willReturn(true);
285  $node->method('isDirectory')->willReturn(true);
286  $node->method('isPermissionCorrect')->willReturn(true);
287  $node->method('isWritable')->willReturn(true);
288  $childMock1 = $this->createMock(NodeInterface::class);
289  $childMock1->expects(self::once())->method('getStatus')->willReturn([]);
290  $childMock2 = $this->createMock(NodeInterface::class);
291  $childMock2->expects(self::once())->method('getStatus')->willReturn([]);
292  $node->_set('children', [$childMock1, $childMock2]);
293  $node->getStatus();
294  }
295 
300  {
302  $node = $this->getAccessibleMock(
303  DirectoryNode::class,
304  ['exists', 'isDirectory', 'isPermissionCorrect', 'getRelativePathBelowSiteRoot', 'isWritable'],
305  [],
306  '',
307  false
308  );
309  $node->method('exists')->willReturn(true);
310  $node->method('isDirectory')->willReturn(true);
311  $node->method('isPermissionCorrect')->willReturn(true);
312  $node->method('isWritable')->willReturn(true);
313  $childMock = $this->createMock(NodeInterface::class);
314  $childMessage = new ‪FlashMessage('foo');
315  $childMock->expects(self::once())->method('getStatus')->willReturn([$childMessage]);
316  $node->_set('children', [$childMock]);
317  $status = $node->getStatus();
318  $statusOfDirectory = $status[0];
319  $statusOfChild = $status[1];
320  self::assertSame(‪FlashMessage::OK, $statusOfDirectory->getSeverity());
321  self::assertSame($childMessage, $statusOfChild);
322  }
323 
328  {
330  $node = $this->getMockBuilder(DirectoryNode::class)
331  ->disableOriginalConstructor()
332  ->setMethods(['fixSelf'])
333  ->getMock();
334  $uniqueReturn = [‪StringUtility::getUniqueId('foo_')];
335  $node->expects(self::once())->method('fixSelf')->willReturn($uniqueReturn);
336  self::assertSame($uniqueReturn, $node->fix());
337  }
338 
343  {
345  $node = $this->getAccessibleMock(DirectoryNode::class, ['fixSelf'], [], '', false);
346  $uniqueReturnSelf = ‪StringUtility::getUniqueId('foo_');
347  $node->expects(self::once())->method('fixSelf')->willReturn([$uniqueReturnSelf]);
348 
349  $childMock1 = $this->createMock(NodeInterface::class);
350  $uniqueReturnChild1 = ‪StringUtility::getUniqueId('foo_');
351  $childMock1->expects(self::once())->method('fix')->willReturn([$uniqueReturnChild1]);
352 
353  $childMock2 = $this->createMock(NodeInterface::class);
354  $uniqueReturnChild2 = ‪StringUtility::getUniqueId('foo_');
355  $childMock2->expects(self::once())->method('fix')->willReturn([$uniqueReturnChild2]);
356 
357  $node->_set('children', [$childMock1, $childMock2]);
358 
359  self::assertSame([$uniqueReturnSelf, $uniqueReturnChild1, $uniqueReturnChild2], $node->fix());
360  }
361 
366  {
368  $node = $this->getAccessibleMock(
369  DirectoryNode::class,
370  ['exists', 'createDirectory', 'isPermissionCorrect'],
371  [],
372  '',
373  false
374  );
375  $node->expects(self::once())->method('exists')->willReturn(false);
376  $node->method('isPermissionCorrect')->willReturn(true);
377  $uniqueReturn = new ‪FlashMessage('foo');
378  $node->expects(self::once())->method('createDirectory')->willReturn($uniqueReturn);
379  self::assertSame([$uniqueReturn], $node->_call('fixSelf'));
380  }
381 
386  {
388  $node = $this->getAccessibleMock(
389  DirectoryNode::class,
390  ['exists', 'isWritable', 'getRelativePathBelowSiteRoot', 'isDirectory', 'getAbsolutePath'],
391  [],
392  '',
393  false
394  );
395  $node->method('exists')->willReturn(true);
396  $node->method('isWritable')->willReturn(true);
397  $node->method('isDirectory')->willReturn(false);
398  $node->method('getRelativePathBelowSiteRoot')->willReturn('');
399  $node->method('getAbsolutePath')->willReturn('');
400  $result = $node->_call('fixSelf');
401  self::assertSame(‪FlashMessage::ERROR, $result[0]->getSeverity());
402  }
403 
408  {
410  $node = $this->getAccessibleMock(
411  DirectoryNode::class,
412  ['exists', 'isWritable', 'fixPermission'],
413  [],
414  '',
415  false
416  );
417  $node->method('exists')->willReturn(true);
418  $node->method('isWritable')->willReturn(false);
419  $message = new ‪FlashMessage('foo');
420  $node->expects(self::once())->method('fixPermission')->willReturn($message);
421  self::assertSame([$message], $node->_call('fixSelf'));
422  }
423 
428  {
429  $this->expectException(Exception::class);
430  $this->expectExceptionCode(1366740091);
432  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath'], [], '', false);
433  $node->expects(self::once())->method('getAbsolutePath')->willReturn('');
434  $node->expects(self::once())->method('exists')->willReturn(true);
435  $node->_call('createDirectory');
436  }
437 
441  public function ‪createDirectoryCreatesDirectory(): void
442  {
444  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath', 'getRelativePathBelowSiteRoot'], [], '', false);
445  $path = $this->‪getVirtualTestFilePath('dir_');
446  $node->expects(self::once())->method('exists')->willReturn(false);
447  $node->method('getAbsolutePath')->willReturn($path);
448  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
449  $node->_call('createDirectory');
450  self::assertDirectoryExists($path);
451  }
452 
457  {
459  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath', 'getRelativePathBelowSiteRoot'], [], '', false);
460  $path = $this->‪getVirtualTestFilePath('dir_');
461  $node->expects(self::once())->method('exists')->willReturn(false);
462  $node->method('getAbsolutePath')->willReturn($path);
463  $node->method('getRelativePathBelowSiteRoot')->willReturn($path);
464  self::assertSame(‪FlashMessage::OK, $node->_call('createDirectory')->getSeverity());
465  }
466 
471  {
473  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath', 'getRelativePathBelowSiteRoot'], [], '', false);
474  $path = $this->‪getVirtualTestDir('root_');
475  chmod($path, 02550);
476  $subPath = $path . '/' . ‪StringUtility::getUniqueId('dir_');
477  $node->expects(self::once())->method('exists')->willReturn(false);
478  $node->method('getAbsolutePath')->willReturn($subPath);
479  $node->method('getRelativePathBelowSiteRoot')->willReturn($subPath);
480  self::assertSame(‪FlashMessage::ERROR, $node->_call('createDirectory')->getSeverity());
481  }
482 
487  {
488  $this->expectException(InvalidArgumentException::class);
489  $this->expectExceptionCode(1366222204);
491  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
492  $brokenStructure = [
493  [
494  'name' => 'foo',
495  ],
496  ];
497  $node->_call('createChildren', $brokenStructure);
498  }
499 
504  {
505  $this->expectException(InvalidArgumentException::class);
506  $this->expectExceptionCode(1366222205);
508  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
509  $brokenStructure = [
510  [
511  'type' => 'foo',
512  ],
513  ];
514  $node->_call('createChildren', $brokenStructure);
515  }
516 
521  {
522  $this->expectException(InvalidArgumentException::class);
523  $this->expectExceptionCode(1366222206);
525  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
526  $brokenStructure = [
527  [
528  'type' => DirectoryNode::class,
529  'name' => 'foo',
530  ],
531  [
532  'type' => DirectoryNode::class,
533  'name' => 'foo',
534  ],
535  ];
536  $node->_call('createChildren', $brokenStructure);
537  }
538 
542  public function ‪getChildrenReturnsCreatedChild(): void
543  {
545  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
546  $parent = $this->createMock(NodeInterface::class);
547  $childName = ‪StringUtility::getUniqueId('test_');
548  $structure = [
549  'name' => 'foo',
550  'type' => DirectoryNode::class,
551  'children' => [
552  [
553  'type' => DirectoryNode::class,
554  'name' => $childName,
555  ],
556  ],
557  ];
558  $node->__construct($structure, $parent);
559  $children = $node->_call('getChildren');
561  $child = $children[0];
562  self::assertInstanceOf(DirectoryNode::class, $children[0]);
563  self::assertSame($childName, $child->getName());
564  }
565 
570  {
572  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
573  $path = $this->‪getVirtualTestFilePath('dir_');
574  $node->method('getAbsolutePath')->willReturn($path);
575  self::assertFalse($node->isWritable());
576  }
577 
582  {
584  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
585  $path = $this->‪getVirtualTestDir('root_');
586  $node->method('getAbsolutePath')->willReturn($path);
587  self::assertTrue($node->isWritable());
588  }
589 
594  {
595  if (function_exists('posix_getegid') && posix_getegid() === 0) {
596  self::markTestSkipped('Test skipped if run on linux as root');
597  }
599  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
600  $path = $this->‪getVirtualTestDir('root_');
601  chmod($path, 02550);
602  $node->method('getAbsolutePath')->willReturn($path);
603  self::assertFalse($node->isWritable());
604  }
605 
610  {
612  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
613  $path = $this->‪getVirtualTestDir('dir_');
614  $node->method('getAbsolutePath')->willReturn($path);
615  self::assertTrue($node->_call('isDirectory'));
616  }
617 
623  {
625  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
626  $path = ‪Environment::getVarPath() . '/tests/' . ‪StringUtility::getUniqueId('root_');
628  $this->testFilesToDelete[] = $path;
629  $link = ‪StringUtility::getUniqueId('link_');
631  mkdir($path . '/' . ‪$dir);
632  symlink($path . '/' . ‪$dir, $path . '/' . $link);
633  $node->method('getAbsolutePath')->willReturn($path . '/' . $link);
634  self::assertFalse($node->_call('isDirectory'));
635  }
636 }
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithOkStatusIfDirectoryExistsAndPermissionAreCorrect
‪getStatusReturnsArrayWithOkStatusIfDirectoryExistsAndPermissionAreCorrect()
Definition: DirectoryNodeTest.php:249
‪TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase\getVirtualTestDir
‪string getVirtualTestDir($prefix='root_')
Definition: FolderStructureTestCase.php:34
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithWarningStatusIfDirectoryNotExists
‪getStatusReturnsArrayWithWarningStatusIfDirectoryNotExists()
Definition: DirectoryNodeTest.php:150
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorSetsParent
‪constructorSetsParent()
Definition: DirectoryNodeTest.php:84
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createChildrenThrowsExceptionIfAChildNameIsNotSet
‪createChildrenThrowsExceptionIfAChildNameIsNotSet()
Definition: DirectoryNodeTest.php:503
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithOwnStatusAndStatusOfChild
‪getStatusReturnsArrayWithOwnStatusAndStatusOfChild()
Definition: DirectoryNodeTest.php:299
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixCallsFixOnChildrenAndReturnsMergedResult
‪fixCallsFixOnChildrenAndReturnsMergedResult()
Definition: DirectoryNodeTest.php:342
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isDirectoryReturnsTrueIfNameIsADirectory
‪isDirectoryReturnsTrueIfNameIsADirectory()
Definition: DirectoryNodeTest.php:609
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorSetsTargetPermission
‪constructorSetsTargetPermission()
Definition: DirectoryNodeTest.php:99
‪TYPO3\CMS\Install\FolderStructure\RootNodeInterface
Definition: RootNodeInterface.php:22
‪$dir
‪$dir
Definition: validateRstFiles.php:213
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusCallsGetStatusOnChildren
‪getStatusCallsGetStatusOnChildren()
Definition: DirectoryNodeTest.php:274
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorThrowsExceptionIfNameContainsForwardSlash
‪constructorThrowsExceptionIfNameContainsForwardSlash()
Definition: DirectoryNodeTest.php:48
‪TYPO3\CMS\Install\FolderStructure\DirectoryNode
Definition: DirectoryNode.php:27
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createChildrenThrowsExceptionIfAChildTypeIsNotSet
‪createChildrenThrowsExceptionIfAChildTypeIsNotSet()
Definition: DirectoryNodeTest.php:486
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorCallsCreateChildrenIfChildrenAreSet
‪constructorCallsCreateChildrenIfChildrenAreSet()
Definition: DirectoryNodeTest.php:62
‪TYPO3\CMS\Install\FolderStructure\Exception\InvalidArgumentException
Definition: InvalidArgumentException.php:24
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorThrowsExceptionIfParentIsNull
‪constructorThrowsExceptionIfParentIsNull()
Definition: DirectoryNodeTest.php:38
‪TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING
‪const WARNING
Definition: AbstractMessage.php:30
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixCallsFixSelfAndReturnsItsResult
‪fixCallsFixSelfAndReturnsItsResult()
Definition: DirectoryNodeTest.php:327
‪TYPO3\CMS\Core\Utility\GeneralUtility\mkdir_deep
‪static mkdir_deep($directory)
Definition: GeneralUtility.php:2022
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure
Definition: AbstractNodeTest.php:16
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getChildrenReturnsCreatedChild
‪getChildrenReturnsCreatedChild()
Definition: DirectoryNodeTest.php:542
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixSelfCallsFixPermissionIfDirectoryExistsButIsNotWritable
‪fixSelfCallsFixPermissionIfDirectoryExistsButIsNotWritable()
Definition: DirectoryNodeTest.php:407
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithErrorStatusIfNodeIsNotADirectory
‪getStatusReturnsArrayWithErrorStatusIfNodeIsNotADirectory()
Definition: DirectoryNodeTest.php:174
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorSetsName
‪constructorSetsName()
Definition: DirectoryNodeTest.php:116
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArray
‪getStatusReturnsArray()
Definition: DirectoryNodeTest.php:127
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsTrueIfNodeExistsAndFileCanBeCreated
‪isWritableReturnsTrueIfNodeExistsAndFileCanBeCreated()
Definition: DirectoryNodeTest.php:581
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixSelfReturnsErrorStatusIfNodeExistsButIsNotADirectoryAndReturnsResult
‪fixSelfReturnsErrorStatusIfNodeExistsButIsNotADirectoryAndReturnsResult()
Definition: DirectoryNodeTest.php:385
‪TYPO3\CMS\Core\Messaging\AbstractMessage\OK
‪const OK
Definition: AbstractMessage.php:29
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryReturnsOkStatusIfDirectoryWasCreated
‪createDirectoryReturnsOkStatusIfDirectoryWasCreated()
Definition: DirectoryNodeTest.php:456
‪TYPO3\CMS\Core\Utility\StringUtility\getUniqueId
‪static string getUniqueId($prefix='')
Definition: StringUtility.php:92
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest
Definition: DirectoryNodeTest.php:34
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:24
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryCreatesDirectory
‪createDirectoryCreatesDirectory()
Definition: DirectoryNodeTest.php:441
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isDirectoryReturnsFalseIfNameIsALinkToADirectory
‪isDirectoryReturnsFalseIfNameIsALinkToADirectory()
Definition: DirectoryNodeTest.php:622
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryThrowsExceptionIfNodeExists
‪createDirectoryThrowsExceptionIfNodeExists()
Definition: DirectoryNodeTest.php:427
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryReturnsErrorStatusIfDirectoryWasNotCreated
‪createDirectoryReturnsErrorStatusIfDirectoryWasNotCreated()
Definition: DirectoryNodeTest.php:470
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithNoticeStatusIfDirectoryExistsButPermissionAreNotCorrect
‪getStatusReturnsArrayWithNoticeStatusIfDirectoryExistsButPermissionAreNotCorrect()
Definition: DirectoryNodeTest.php:224
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createChildrenThrowsExceptionForMultipleChildrenWithSameName
‪createChildrenThrowsExceptionForMultipleChildrenWithSameName()
Definition: DirectoryNodeTest.php:520
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:40
‪TYPO3\CMS\Core\Messaging\AbstractMessage\NOTICE
‪const NOTICE
Definition: AbstractMessage.php:27
‪TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase
Definition: FolderStructureTestCase.php:27
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:22
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsFalseIfNodeExistsButFileCanNotBeCreated
‪isWritableReturnsFalseIfNodeExistsButFileCanNotBeCreated()
Definition: DirectoryNodeTest.php:593
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsFalseIfNodeDoesNotExist
‪isWritableReturnsFalseIfNodeDoesNotExist()
Definition: DirectoryNodeTest.php:569
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithErrorStatusIfDirectoryExistsButIsNotWritable
‪getStatusReturnsArrayWithErrorStatusIfDirectoryExistsButIsNotWritable()
Definition: DirectoryNodeTest.php:199
‪TYPO3\CMS\Install\FolderStructure\NodeInterface
Definition: NodeInterface.php:24
‪TYPO3\CMS\Install\FolderStructure\Exception
Definition: InvalidArgumentException.php:16
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:31
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixSelfCallsCreateDirectoryIfDirectoryDoesNotExistAndReturnsResult
‪fixSelfCallsCreateDirectoryIfDirectoryDoesNotExistAndReturnsResult()
Definition: DirectoryNodeTest.php:365
‪TYPO3\CMS\Core\Core\Environment\getVarPath
‪static string getVarPath()
Definition: Environment.php:192
‪TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase\getVirtualTestFilePath
‪string getVirtualTestFilePath($prefix='file_')
Definition: FolderStructureTestCase.php:48