TYPO3 CMS  TYPO3_7-6
FileNameFilterTest.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  */
18 
23 {
30  {
31  return [
32  ['file', '/file', true],
33  ['.htaccess', '/.htaccess', -1],
34  ['applypatch-msg.sample', '/.git/applypatch-msg.sample', -1],
35  ['applypatch-msg.sample', '/user_upload/.git/applypatch-msg.sample', -1],
36  ];
37  }
38 
45  {
46  return [
47  ['file', '/file', true],
48  ['.htaccess', '/.htaccess', true],
49  ['applypatch-msg.sample', '/.git/applypatch-msg.sample', true],
50  ['applypatch-msg.sample', '/user_upload/.git/applypatch-msg.sample', true],
51  ];
52  }
53 
61  public function filterHiddenFilesAndFoldersFiltersHiddenFilesAndFolders($itemName, $itemIdentifier, $expected)
62  {
64  $driverMock = $this->getMock(DriverInterface::class);
65  $this->assertSame(
66  $expected,
68  $itemName, $itemIdentifier, '', [], $driverMock
69  )
70  );
71  }
72 
80  public function filterHiddenFilesAndFoldersAllowsHiddenFilesAndFolders($itemName, $itemIdentifier, $expected)
81  {
83  $driverMock = $this->getMock(DriverInterface::class);
85  $this->assertSame(
87  $itemName, $itemIdentifier, '', [], $driverMock
88  ),
89  $expected
90  );
91  }
92 }
static filterHiddenFilesAndFolders($itemName, $itemIdentifier, $parentIdentifier, array $additionalInformation, \TYPO3\CMS\Core\Resource\Driver\DriverInterface $driverInstance)
static setShowHiddenFilesAndFolders($showHiddenFilesAndFolders)