30 $GLOBALS[
'LANG'] = $this->getMock(
'TYPO3\\CMS\\Lang\\LanguageService', array(
'sL'));
31 $GLOBALS[
'TYPO3_DB'] = $this->getMock(
'TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array());
37 public function folderHasFilesInUseReturnsTrueIfItHasFiles() {
39 $file = $this->getMock(
'TYPO3\\CMS\\Core\\Resource\\File', array(
'getUid'), array(),
'', FALSE);
40 $file->expects($this->once())->method(
'getUid')->will($this->returnValue($fileUid));
42 $folder = $this->getMock(
'TYPO3\\CMS\\Core\\Resource\\Folder', array(
'getFiles'), array(),
'', FALSE);
43 $folder->expects($this->once())
45 ->will($this->returnValue(array($file))
49 $subject = $this->getMock(
'TYPO3\\CMS\\Core\\Utility\File\\ExtendedFileUtility', array(
'addFlashMessage'), array(),
'');
50 $GLOBALS[
'TYPO3_DB']->expects($this->once())
51 ->method(
'exec_SELECTcountRows')->with(
'*',
'sys_refindex',
'deleted=0 AND ref_table="sys_file" AND ref_uid IN (' . $fileUid .
') AND tablename<>"sys_file_metadata"')
52 ->will($this->returnValue(1));
54 $GLOBALS[
'LANG']->expects($this->at(0))->method(
'sL')
55 ->with(
'LLL:EXT:lang/locallang_core.xlf:message.description.folderNotDeletedHasFilesWithReferences')
56 ->will($this->returnValue(
'folderNotDeletedHasFilesWithReferences'));
57 $GLOBALS[
'LANG']->expects($this->at(1))->method(
'sL')
58 ->with(
'LLL:EXT:lang/locallang_core.xlf:message.header.folderNotDeletedHasFilesWithReferences')
59 ->will($this->returnValue(
'folderNotDeletedHasFilesWithReferences'));
61 $result = $subject->folderHasFilesInUse($folder);
68 public function folderHasFilesInUseReturnsFalseIfItHasNoFiles() {
69 $folder = $this->getMock(
'TYPO3\\CMS\\Core\\Resource\\Folder', array(
'getFiles'), array(),
'', FALSE);
71 $this->returnValue(array())
75 $subject = $this->getMock(
'TYPO3\\CMS\\Core\\Utility\File\\ExtendedFileUtility', array(
'addFlashMessage'), array(),
'');
76 $this->assertFalse($subject->folderHasFilesInUse($folder));
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
const FILTER_MODE_USE_OWN_AND_STORAGE_FILTERS
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]