‪TYPO3CMS  9.5
DirectoryNodeTest.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 
25 use TYPO3\TestingFramework\Core\AccessibleObjectInterface;
26 
31 {
36  {
37  $this->expectException(InvalidArgumentException::class);
38  $this->expectExceptionCode(1366222203);
40  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
41  $node->__construct([], null);
42  }
43 
48  {
49  $this->expectException(InvalidArgumentException::class);
50  $this->expectExceptionCode(1366226639);
51  $parent = $this->createMock(NodeInterface::class);
53  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
54  $structure = [
55  'name' => 'foo/bar',
56  ];
57  $node->__construct($structure, $parent);
58  }
59 
64  {
65  $parent = $this->createMock(NodeInterface::class);
67  $node = $this->getAccessibleMock(
68  DirectoryNode::class,
69  ['createChildren'],
70  [],
71  '',
72  false
73  );
74  $childArray = [
75  'foo',
76  ];
77  $structure = [
78  'name' => 'foo',
79  'children' => $childArray,
80  ];
81  $node->expects($this->once())->method('createChildren')->with($childArray);
82  $node->__construct($structure, $parent);
83  }
84 
88  public function ‪constructorSetsParent()
89  {
90  $parent = $this->createMock(NodeInterface::class);
92  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
93  $structure = [
94  'name' => 'foo',
95  ];
96  $node->__construct($structure, $parent);
97  $this->assertSame($parent, $node->_call('getParent'));
98  }
99 
104  {
105  $parent = $this->createMock(NodeInterface::class);
107  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
108  $targetPermission = '2550';
109  $structure = [
110  'name' => 'foo',
111  'targetPermission' => $targetPermission,
112  ];
113  $node->__construct($structure, $parent);
114  $this->assertSame($targetPermission, $node->_call('getTargetPermission'));
115  }
116 
120  public function ‪constructorSetsName()
121  {
123  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
124  $parent = $this->createMock(RootNodeInterface::class);
125  $name = $this->getUniqueId('test_');
126  $node->__construct(['name' => $name], $parent);
127  $this->assertSame($name, $node->getName());
128  }
129 
133  public function ‪getStatusReturnsArray()
134  {
136  $node = $this->getAccessibleMock(
137  DirectoryNode::class,
138  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
139  [],
140  '',
141  false
142  );
143  $path = $this->‪getVirtualTestDir('dir_');
144  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
145  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue($path));
146  $node->expects($this->any())->method('exists')->will($this->returnValue(true));
147  $node->expects($this->any())->method('isDirectory')->will($this->returnValue(true));
148  $node->expects($this->any())->method('isPermissionCorrect')->will($this->returnValue(true));
149  $node->expects($this->any())->method('isWritable')->will($this->returnValue(true));
150  $this->assertInternalType('array', $node->getStatus());
151  }
152 
157  {
159  $node = $this->getAccessibleMock(
160  DirectoryNode::class,
161  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
162  [],
163  '',
164  false
165  );
166  $path = $this->‪getVirtualTestDir('dir_');
167  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
168  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue($path));
169  $node->expects($this->any())->method('exists')->will($this->returnValue(false));
170  $node->expects($this->any())->method('isDirectory')->will($this->returnValue(false));
171  $node->expects($this->any())->method('isPermissionCorrect')->will($this->returnValue(false));
172  $node->expects($this->any())->method('isWritable')->will($this->returnValue(false));
173  $statusArray = $node->getStatus();
174  $this->assertSame(‪FlashMessage::WARNING, $statusArray[0]->getSeverity());
175  }
176 
181  {
183  $node = $this->getAccessibleMock(
184  DirectoryNode::class,
185  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
186  [],
187  '',
188  false
189  );
190  $path = $this->‪getVirtualTestFilePath('dir_');
191  touch($path);
192  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
193  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue($path));
194  $node->expects($this->any())->method('exists')->will($this->returnValue(true));
195  $node->expects($this->any())->method('isDirectory')->will($this->returnValue(false));
196  $node->expects($this->any())->method('isPermissionCorrect')->will($this->returnValue(true));
197  $node->expects($this->any())->method('isWritable')->will($this->returnValue(true));
198  $statusArray = $node->getStatus();
199  $this->assertSame(‪FlashMessage::ERROR, $statusArray[0]->getSeverity());
200  }
201 
206  {
208  $node = $this->getAccessibleMock(
209  DirectoryNode::class,
210  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
211  [],
212  '',
213  false
214  );
215  $path = $this->‪getVirtualTestFilePath('dir_');
216  touch($path);
217  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
218  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue($path));
219  $node->expects($this->any())->method('exists')->will($this->returnValue(true));
220  $node->expects($this->any())->method('isDirectory')->will($this->returnValue(true));
221  $node->expects($this->any())->method('isPermissionCorrect')->will($this->returnValue(true));
222  $node->expects($this->any())->method('isWritable')->will($this->returnValue(false));
223  $statusArray = $node->getStatus();
224  $this->assertSame(‪FlashMessage::ERROR, $statusArray[0]->getSeverity());
225  }
226 
231  {
233  $node = $this->getAccessibleMock(
234  DirectoryNode::class,
235  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
236  [],
237  '',
238  false
239  );
240  $path = $this->‪getVirtualTestFilePath('dir_');
241  touch($path);
242  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
243  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue($path));
244  $node->expects($this->any())->method('exists')->will($this->returnValue(true));
245  $node->expects($this->any())->method('isDirectory')->will($this->returnValue(true));
246  $node->expects($this->any())->method('isPermissionCorrect')->will($this->returnValue(false));
247  $node->expects($this->any())->method('isWritable')->will($this->returnValue(true));
248  $statusArray = $node->getStatus();
249  $this->assertSame(‪FlashMessage::NOTICE, $statusArray[0]->getSeverity());
250  }
251 
256  {
258  $node = $this->getAccessibleMock(
259  DirectoryNode::class,
260  ['getAbsolutePath', 'getRelativePathBelowSiteRoot', 'exists', 'isDirectory', 'isWritable', 'isPermissionCorrect'],
261  [],
262  '',
263  false
264  );
265  $path = $this->‪getVirtualTestFilePath('dir_');
266  touch($path);
267  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
268  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue($path));
269  $node->expects($this->any())->method('exists')->will($this->returnValue(true));
270  $node->expects($this->any())->method('isDirectory')->will($this->returnValue(true));
271  $node->expects($this->any())->method('isPermissionCorrect')->will($this->returnValue(true));
272  $node->expects($this->any())->method('isWritable')->will($this->returnValue(true));
273  $statusArray = $node->getStatus();
274  $this->assertSame(‪FlashMessage::OK, $statusArray[0]->getSeverity());
275  }
276 
281  {
283  $node = $this->getAccessibleMock(
284  DirectoryNode::class,
285  ['exists', 'isDirectory', 'isPermissionCorrect', 'getRelativePathBelowSiteRoot', 'isWritable'],
286  [],
287  '',
288  false
289  );
290  $node->expects($this->any())->method('exists')->will($this->returnValue(true));
291  $node->expects($this->any())->method('isDirectory')->will($this->returnValue(true));
292  $node->expects($this->any())->method('isPermissionCorrect')->will($this->returnValue(true));
293  $node->expects($this->any())->method('isWritable')->will($this->returnValue(true));
294  $childMock1 = $this->createMock(NodeInterface::class);
295  $childMock1->expects($this->once())->method('getStatus')->will($this->returnValue([]));
296  $childMock2 = $this->createMock(NodeInterface::class);
297  $childMock2->expects($this->once())->method('getStatus')->will($this->returnValue([]));
298  $node->_set('children', [$childMock1, $childMock2]);
299  $node->getStatus();
300  }
301 
306  {
308  $node = $this->getAccessibleMock(
309  DirectoryNode::class,
310  ['exists', 'isDirectory', 'isPermissionCorrect', 'getRelativePathBelowSiteRoot', 'isWritable'],
311  [],
312  '',
313  false
314  );
315  $node->expects($this->any())->method('exists')->will($this->returnValue(true));
316  $node->expects($this->any())->method('isDirectory')->will($this->returnValue(true));
317  $node->expects($this->any())->method('isPermissionCorrect')->will($this->returnValue(true));
318  $node->expects($this->any())->method('isWritable')->will($this->returnValue(true));
319  $childMock = $this->createMock(NodeInterface::class);
320  $childMessage = new ‪FlashMessage('foo');
321  $childMock->expects($this->once())->method('getStatus')->will($this->returnValue([$childMessage]));
322  $node->_set('children', [$childMock]);
323  $status = $node->getStatus();
324  $statusOfDirectory = $status[0];
325  $statusOfChild = $status[1];
326  $this->assertSame(‪FlashMessage::OK, $statusOfDirectory->getSeverity());
327  $this->assertSame($childMessage, $statusOfChild);
328  }
329 
334  {
336  $node = $this->getAccessibleMock(
337  DirectoryNode::class,
338  ['fixSelf'],
339  [],
340  '',
341  false
342  );
343  $uniqueReturn = [$this->getUniqueId('foo_')];
344  $node->expects($this->once())->method('fixSelf')->will($this->returnValue($uniqueReturn));
345  $this->assertSame($uniqueReturn, $node->fix());
346  }
347 
352  {
354  $node = $this->getAccessibleMock(DirectoryNode::class, ['fixSelf'], [], '', false);
355  $uniqueReturnSelf = $this->getUniqueId('foo_');
356  $node->expects($this->once())->method('fixSelf')->will($this->returnValue([$uniqueReturnSelf]));
357 
358  $childMock1 = $this->createMock(NodeInterface::class);
359  $uniqueReturnChild1 = $this->getUniqueId('foo_');
360  $childMock1->expects($this->once())->method('fix')->will($this->returnValue([$uniqueReturnChild1]));
361 
362  $childMock2 = $this->createMock(NodeInterface::class);
363  $uniqueReturnChild2 = $this->getUniqueId('foo_');
364  $childMock2->expects($this->once())->method('fix')->will($this->returnValue([$uniqueReturnChild2]));
365 
366  $node->_set('children', [$childMock1, $childMock2]);
367 
368  $this->assertSame([$uniqueReturnSelf, $uniqueReturnChild1, $uniqueReturnChild2], $node->fix());
369  }
370 
375  {
377  $node = $this->getAccessibleMock(
378  DirectoryNode::class,
379  ['exists', 'createDirectory', 'isPermissionCorrect'],
380  [],
381  '',
382  false
383  );
384  $node->expects($this->once())->method('exists')->will($this->returnValue(false));
385  $node->expects($this->any())->method('isPermissionCorrect')->will($this->returnValue(true));
386  $uniqueReturn = new ‪FlashMessage('foo');
387  $node->expects($this->once())->method('createDirectory')->will($this->returnValue($uniqueReturn));
388  $this->assertSame([$uniqueReturn], $node->_call('fixSelf'));
389  }
390 
395  {
397  $node = $this->getAccessibleMock(
398  DirectoryNode::class,
399  ['exists', 'isWritable', 'getRelativePathBelowSiteRoot', 'isDirectory', 'getAbsolutePath'],
400  [],
401  '',
402  false
403  );
404  $node->expects($this->any())->method('exists')->will($this->returnValue(true));
405  $node->expects($this->any())->method('isWritable')->will($this->returnValue(true));
406  $node->expects($this->any())->method('isDirectory')->will($this->returnValue(false));
407  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue(''));
408  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue(''));
409  $result = $node->_call('fixSelf');
410  $this->assertSame(‪FlashMessage::ERROR, $result[0]->getSeverity());
411  }
412 
417  {
419  $node = $this->getAccessibleMock(
420  DirectoryNode::class,
421  ['exists', 'isWritable', 'fixPermission'],
422  [],
423  '',
424  false
425  );
426  $node->expects($this->any())->method('exists')->will($this->returnValue(true));
427  $node->expects($this->any())->method('isWritable')->will($this->returnValue(false));
428  $message = new ‪FlashMessage('foo');
429  $node->expects($this->once())->method('fixPermission')->will($this->returnValue($message));
430  $this->assertSame([$message], $node->_call('fixSelf'));
431  }
432 
437  {
438  $this->expectException(Exception::class);
439  $this->expectExceptionCode(1366740091);
441  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath'], [], '', false);
442  $node->expects($this->once())->method('getAbsolutePath')->will($this->returnValue(''));
443  $node->expects($this->once())->method('exists')->will($this->returnValue(true));
444  $node->_call('createDirectory');
445  }
446 
451  {
453  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath', 'getRelativePathBelowSiteRoot'], [], '', false);
454  $path = $this->‪getVirtualTestFilePath('dir_');
455  $node->expects($this->once())->method('exists')->will($this->returnValue(false));
456  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
457  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue($path));
458  $node->_call('createDirectory');
459  $this->assertTrue(is_dir($path));
460  }
461 
466  {
468  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath', 'getRelativePathBelowSiteRoot'], [], '', false);
469  $path = $this->‪getVirtualTestFilePath('dir_');
470  $node->expects($this->once())->method('exists')->will($this->returnValue(false));
471  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
472  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue($path));
473  $this->assertSame(‪FlashMessage::OK, $node->_call('createDirectory')->getSeverity());
474  }
475 
480  {
482  $node = $this->getAccessibleMock(DirectoryNode::class, ['exists', 'getAbsolutePath', 'getRelativePathBelowSiteRoot'], [], '', false);
483  $path = $this->‪getVirtualTestDir('root_');
484  chmod($path, 02550);
485  $subPath = $path . '/' . $this->getUniqueId('dir_');
486  $node->expects($this->once())->method('exists')->will($this->returnValue(false));
487  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($subPath));
488  $node->expects($this->any())->method('getRelativePathBelowSiteRoot')->will($this->returnValue($subPath));
489  $this->assertSame(‪FlashMessage::ERROR, $node->_call('createDirectory')->getSeverity());
490  }
491 
496  {
497  $this->expectException(InvalidArgumentException::class);
498  $this->expectExceptionCode(1366222204);
500  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
501  $brokenStructure = [
502  [
503  'name' => 'foo',
504  ],
505  ];
506  $node->_call('createChildren', $brokenStructure);
507  }
508 
513  {
514  $this->expectException(InvalidArgumentException::class);
515  $this->expectExceptionCode(1366222205);
517  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
518  $brokenStructure = [
519  [
520  'type' => 'foo',
521  ],
522  ];
523  $node->_call('createChildren', $brokenStructure);
524  }
525 
530  {
531  $this->expectException(InvalidArgumentException::class);
532  $this->expectExceptionCode(1366222206);
534  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
535  $brokenStructure = [
536  [
537  'type' => DirectoryNode::class,
538  'name' => 'foo',
539  ],
540  [
541  'type' => DirectoryNode::class,
542  'name' => 'foo',
543  ],
544  ];
545  $node->_call('createChildren', $brokenStructure);
546  }
547 
552  {
554  $node = $this->getAccessibleMock(DirectoryNode::class, ['dummy'], [], '', false);
555  $parent = $this->createMock(NodeInterface::class);
556  $childName = $this->getUniqueId('test_');
557  $structure = [
558  'name' => 'foo',
559  'type' => DirectoryNode::class,
560  'children' => [
561  [
562  'type' => DirectoryNode::class,
563  'name' => $childName,
564  ],
565  ],
566  ];
567  $node->__construct($structure, $parent);
568  $children = $node->_call('getChildren');
570  $child = $children[0];
571  $this->assertInstanceOf(DirectoryNode::class, $children[0]);
572  $this->assertSame($childName, $child->getName());
573  }
574 
579  {
581  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
582  $path = $this->‪getVirtualTestFilePath('dir_');
583  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
584  $this->assertFalse($node->isWritable());
585  }
586 
591  {
593  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
594  $path = $this->‪getVirtualTestDir('root_');
595  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
596  $this->assertTrue($node->isWritable());
597  }
598 
603  {
604  if (function_exists('posix_getegid') && posix_getegid() === 0) {
605  $this->markTestSkipped('Test skipped if run on linux as root');
606  }
608  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
609  $path = $this->‪getVirtualTestDir('root_');
610  chmod($path, 02550);
611  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
612  $this->assertFalse($node->isWritable());
613  }
614 
619  {
621  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
622  $path = $this->‪getVirtualTestDir('dir_');
623  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path));
624  $this->assertTrue($node->_call('isDirectory'));
625  }
626 
632  {
634  $node = $this->getAccessibleMock(DirectoryNode::class, ['getAbsolutePath'], [], '', false);
635  $path = ‪Environment::getVarPath() . '/tests/' . $this->getUniqueId('root_');
636  \TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep($path);
637  $this->testFilesToDelete[] = $path;
638  $link = $this->getUniqueId('link_');
639  ‪$dir = $this->getUniqueId('dir_');
640  mkdir($path . '/' . ‪$dir);
641  symlink($path . '/' . ‪$dir, $path . '/' . $link);
642  $node->expects($this->any())->method('getAbsolutePath')->will($this->returnValue($path . '/' . $link));
643  $this->assertFalse($node->_call('isDirectory'));
644  }
645 }
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithOkStatusIfDirectoryExistsAndPermissionAreCorrect
‪getStatusReturnsArrayWithOkStatusIfDirectoryExistsAndPermissionAreCorrect()
Definition: DirectoryNodeTest.php:255
‪TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase\getVirtualTestDir
‪string getVirtualTestDir($prefix='root_')
Definition: FolderStructureTestCase.php:31
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithWarningStatusIfDirectoryNotExists
‪getStatusReturnsArrayWithWarningStatusIfDirectoryNotExists()
Definition: DirectoryNodeTest.php:156
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorSetsParent
‪constructorSetsParent()
Definition: DirectoryNodeTest.php:88
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createChildrenThrowsExceptionIfAChildNameIsNotSet
‪createChildrenThrowsExceptionIfAChildNameIsNotSet()
Definition: DirectoryNodeTest.php:512
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithOwnStatusAndStatusOfChild
‪getStatusReturnsArrayWithOwnStatusAndStatusOfChild()
Definition: DirectoryNodeTest.php:305
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixCallsFixOnChildrenAndReturnsMergedResult
‪fixCallsFixOnChildrenAndReturnsMergedResult()
Definition: DirectoryNodeTest.php:351
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isDirectoryReturnsTrueIfNameIsADirectory
‪isDirectoryReturnsTrueIfNameIsADirectory()
Definition: DirectoryNodeTest.php:618
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorSetsTargetPermission
‪constructorSetsTargetPermission()
Definition: DirectoryNodeTest.php:103
‪TYPO3\CMS\Install\FolderStructure\RootNodeInterface
Definition: RootNodeInterface.php:21
‪$dir
‪$dir
Definition: validateRstFiles.php:213
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusCallsGetStatusOnChildren
‪getStatusCallsGetStatusOnChildren()
Definition: DirectoryNodeTest.php:280
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorThrowsExceptionIfNameContainsForwardSlash
‪constructorThrowsExceptionIfNameContainsForwardSlash()
Definition: DirectoryNodeTest.php:47
‪TYPO3\CMS\Install\FolderStructure\DirectoryNode
Definition: DirectoryNode.php:25
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createChildrenThrowsExceptionIfAChildTypeIsNotSet
‪createChildrenThrowsExceptionIfAChildTypeIsNotSet()
Definition: DirectoryNodeTest.php:495
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorCallsCreateChildrenIfChildrenAreSet
‪constructorCallsCreateChildrenIfChildrenAreSet()
Definition: DirectoryNodeTest.php:63
‪TYPO3\CMS\Install\FolderStructure\Exception\InvalidArgumentException
Definition: InvalidArgumentException.php:21
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorThrowsExceptionIfParentIsNull
‪constructorThrowsExceptionIfParentIsNull()
Definition: DirectoryNodeTest.php:35
‪TYPO3\CMS\Core\Messaging\AbstractMessage\WARNING
‪const WARNING
Definition: AbstractMessage.php:28
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixCallsFixSelfAndReturnsItsResult
‪fixCallsFixSelfAndReturnsItsResult()
Definition: DirectoryNodeTest.php:333
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure
Definition: AbstractNodeTest.php:2
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getChildrenReturnsCreatedChild
‪getChildrenReturnsCreatedChild()
Definition: DirectoryNodeTest.php:551
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixSelfCallsFixPermissionIfDirectoryExistsButIsNotWritable
‪fixSelfCallsFixPermissionIfDirectoryExistsButIsNotWritable()
Definition: DirectoryNodeTest.php:416
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithErrorStatusIfNodeIsNotADirectory
‪getStatusReturnsArrayWithErrorStatusIfNodeIsNotADirectory()
Definition: DirectoryNodeTest.php:180
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\constructorSetsName
‪constructorSetsName()
Definition: DirectoryNodeTest.php:120
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArray
‪getStatusReturnsArray()
Definition: DirectoryNodeTest.php:133
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsTrueIfNodeExistsAndFileCanBeCreated
‪isWritableReturnsTrueIfNodeExistsAndFileCanBeCreated()
Definition: DirectoryNodeTest.php:590
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixSelfReturnsErrorStatusIfNodeExistsButIsNotADirectoryAndReturnsResult
‪fixSelfReturnsErrorStatusIfNodeExistsButIsNotADirectoryAndReturnsResult()
Definition: DirectoryNodeTest.php:394
‪TYPO3\CMS\Core\Messaging\AbstractMessage\OK
‪const OK
Definition: AbstractMessage.php:27
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryReturnsOkStatusIfDirectoryWasCreated
‪createDirectoryReturnsOkStatusIfDirectoryWasCreated()
Definition: DirectoryNodeTest.php:465
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest
Definition: DirectoryNodeTest.php:31
‪TYPO3\CMS\Core\Messaging\FlashMessage
Definition: FlashMessage.php:22
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryCreatesDirectory
‪createDirectoryCreatesDirectory()
Definition: DirectoryNodeTest.php:450
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isDirectoryReturnsFalseIfNameIsALinkToADirectory
‪isDirectoryReturnsFalseIfNameIsALinkToADirectory()
Definition: DirectoryNodeTest.php:631
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryThrowsExceptionIfNodeExists
‪createDirectoryThrowsExceptionIfNodeExists()
Definition: DirectoryNodeTest.php:436
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createDirectoryReturnsErrorStatusIfDirectoryWasNotCreated
‪createDirectoryReturnsErrorStatusIfDirectoryWasNotCreated()
Definition: DirectoryNodeTest.php:479
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithNoticeStatusIfDirectoryExistsButPermissionAreNotCorrect
‪getStatusReturnsArrayWithNoticeStatusIfDirectoryExistsButPermissionAreNotCorrect()
Definition: DirectoryNodeTest.php:230
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\createChildrenThrowsExceptionForMultipleChildrenWithSameName
‪createChildrenThrowsExceptionForMultipleChildrenWithSameName()
Definition: DirectoryNodeTest.php:529
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:39
‪TYPO3\CMS\Core\Messaging\AbstractMessage\NOTICE
‪const NOTICE
Definition: AbstractMessage.php:25
‪TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase
Definition: FolderStructureTestCase.php:24
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsFalseIfNodeExistsButFileCanNotBeCreated
‪isWritableReturnsFalseIfNodeExistsButFileCanNotBeCreated()
Definition: DirectoryNodeTest.php:602
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\isWritableReturnsFalseIfNodeDoesNotExist
‪isWritableReturnsFalseIfNodeDoesNotExist()
Definition: DirectoryNodeTest.php:578
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\getStatusReturnsArrayWithErrorStatusIfDirectoryExistsButIsNotWritable
‪getStatusReturnsArrayWithErrorStatusIfDirectoryExistsButIsNotWritable()
Definition: DirectoryNodeTest.php:205
‪TYPO3\CMS\Install\FolderStructure\NodeInterface
Definition: NodeInterface.php:23
‪TYPO3\CMS\Install\FolderStructure\Exception
Definition: InvalidArgumentException.php:2
‪TYPO3\CMS\Core\Messaging\AbstractMessage\ERROR
‪const ERROR
Definition: AbstractMessage.php:29
‪TYPO3\CMS\Install\Tests\Unit\FolderStructure\DirectoryNodeTest\fixSelfCallsCreateDirectoryIfDirectoryDoesNotExistAndReturnsResult
‪fixSelfCallsCreateDirectoryIfDirectoryDoesNotExistAndReturnsResult()
Definition: DirectoryNodeTest.php:374
‪TYPO3\CMS\Core\Core\Environment\getVarPath
‪static string getVarPath()
Definition: Environment.php:165
‪TYPO3\CMS\Install\Tests\Unit\FolderStructureTestCase\getVirtualTestFilePath
‪string getVirtualTestFilePath($prefix='file_')
Definition: FolderStructureTestCase.php:45