32 $this->mockedDb = $this->getMock(
'TYPO3\\CMS\\Core\\Database\\DatabaseConnection');
37 $this->subject = $this->getMockForAbstractClass(
'TYPO3\\CMS\\Core\\Resource\\AbstractRepository', array(),
'', FALSE);
44 $this->setExpectedException(
'InvalidArgumentException',
'', 1316779798);
45 $this->subject->findByUid(
'asdf');
53 $this->mockedDb->expects($this->once())->method(
'exec_SELECTgetSingleRow')->with($this->anything(), $this->anything(), $this->stringContains(
'uid=' . 123))->will($this->returnValue(array(
'uid' => 123)));
54 $this->subject->findByUid(
'123');
63 public function getWhereClauseForEnabledFieldsIncludesDeletedCheckInBackend() {
65 'sys_file_storage' => array(
67 'delete' =>
'deleted',
73 'TYPO3\\CMS\\Core\\Resource\\StorageRepository',
79 $result = $storageRepositoryMock->_call(
'getWhereClauseForEnabledFields');
80 $this->assertContains(
'sys_file_storage.deleted=0',
$result);
91 $sysPageMock = $this->getMock(
'TYPO3\\CMS\\Frontend\\Page\\PageRepository');
92 $GLOBALS[
'TSFE']->sys_page = $sysPageMock;
94 ->expects($this->once())
95 ->method(
'deleteClause')
96 ->with(
'sys_file_storage');
98 'TYPO3\\CMS\\Core\\Resource\\StorageRepository',
99 array(
'getEnvironmentMode'),
104 $storageRepositoryMock->expects($this->any())->method(
'getEnvironmentMode')->will($this->returnValue(
'FE'));
105 $storageRepositoryMock->_call(
'getWhereClauseForEnabledFields');
findByUidFailsIfUidIsString()
findByUidAcceptsNumericUidInString()
getAccessibleMock( $originalClassName, array $methods=array(), array $arguments=array(), $mockClassName='', $callOriginalConstructor=TRUE, $callOriginalClone=TRUE, $callAutoload=TRUE)
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.
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
getWhereClauseForEnabledFieldsCallsSysPageForDeletedFlagInFrontend()