TYPO3 CMS  TYPO3_6-2
AbstractImportTestCase.php
Go to the documentation of this file.
1 <?php
3 
18 
19 require_once __DIR__ . '/../../../../core/Tests/Functional/DataHandling/AbstractDataHandlerActionTestCase.php';
20 
25 
29  protected $coreExtensionsToLoad = array('impexp');
30 
34  protected $import;
35 
42  protected $testFilesToDelete = array();
43 
50  public function setUp() {
51  parent::setUp();
52 
53  $this->import = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Impexp\\ImportExport');
54  $this->import->init(0, 'import');
55  }
56 
60  public function tearDown() {
61  foreach ($this->testFilesToDelete as $absoluteFileName) {
62  if (@is_file($absoluteFileName)) {
63  unlink($absoluteFileName);
64  }
65  }
66  parent::tearDown();
67  }
68 
74  protected function isCaseSensitiveFilesystem() {
75  $caseSensitive = TRUE;
76  $path = GeneralUtility::tempnam('aAbB');
77 
78  // do the actual sensitivity check
79  if (@file_exists(strtoupper($path)) && @file_exists(strtolower($path))) {
80  $caseSensitive = FALSE;
81  }
82 
83  // clean filesystem
84  unlink($path);
85  return $caseSensitive;
86  }
87 
88 }
static tempnam($filePrefix, $fileSuffix='')