Commit 5d481fb6 authored by Christian Kuhn's avatar Christian Kuhn
Browse files

[TASK] Rename Core\DataHandler\DataHandler

Old t3lib_tcemain was renamed to Core\DataHandler\DataHandling, but
should have been Core\DataHandling\DataHandler instead, located
beside the other classes and hook interfaces.
The patch moves the file and corrects all usages, and raises
submodule pointers of workspace and version that already got
the rename patches.

Change-Id: I394849aceebc389d88b0da0f0ff9751a7cc8efc5
Resolves: #41094
Related: #40095
Related: #41095
Related: #41096
Releases: 6.0
Reviewed-on: http://review.typo3.org/14762
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
parent a099498c
......@@ -2,7 +2,7 @@
/*
* @deprecated since 6.0, the classname t3lib_TCEmain and this file is obsolete
* and will be removed by 7.0. The class was renamed and is now located at:
* typo3/sysext/core/Classes/DataHandler/DataHandler.php
* typo3/sysext/core/Classes/DataHandling/DataHandler.php
*/
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('core') . 'Classes/DataHandler/DataHandler.php';
require_once \TYPO3\CMS\Core\Extension\ExtensionManager::extPath('core') . 'Classes/DataHandling/DataHandler.php';
?>
\ No newline at end of file
......@@ -399,8 +399,8 @@ class EditDocumentController {
$this->vC = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('vC');
// See tce_db.php for relevate options here:
// Only options related to $this->data submission are included here.
/** @var $tce \TYPO3\CMS\Core\DataHandler\DataHandler */
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
/** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = 0;
if (isset($_POST['_translation_savedok_x'])) {
$tce->updateModeL10NdiffData = 'FORCE_FFUPD';
......
......@@ -307,7 +307,7 @@ class PageLayoutController {
*/
public function clearCache() {
if ($this->clear_cache) {
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = 0;
$tce->start(array(), array());
$tce->clear_cacheCmd($this->id);
......
......@@ -90,7 +90,7 @@ class SimpleDataHandlerController {
/**
* TYPO3 Core Engine
*
* @var \TYPO3\CMS\Core\DataHandler\DataHandler
* @var \TYPO3\CMS\Core\DataHandling\DataHandler
* @todo Define visibility
*/
public $tce;
......@@ -116,7 +116,7 @@ class SimpleDataHandlerController {
$this->uPT = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('uPT');
$this->generalComment = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('generalComment');
// Creating TCEmain object
$this->tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$this->tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$this->tce->stripslashes_values = 0;
$this->tce->generalComment = $this->generalComment;
// Configuring based on user prefs.
......
......@@ -124,7 +124,7 @@ class AddController {
$current = reset($trData->regTableItems_data);
// If that record was found (should absolutely be...), then init TCEmain and set, prepend or append the record
if (is_array($current)) {
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = 0;
$data = array();
$addEl = $this->table . '_' . $this->id;
......
......@@ -299,7 +299,7 @@ class FormsController {
// If a save button has been pressed, then save the new field content:
if ($_POST['savedok_x'] || $_POST['saveandclosedok_x']) {
// Make TCEmain object:
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = 0;
// Put content into the data array:
$data = array();
......
......@@ -241,7 +241,7 @@ class TableController {
// If a save button has been pressed, then save the new field content:
if ($_POST['savedok_x'] || $_POST['saveandclosedok_x']) {
// Make TCEmain object:
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = 0;
// Put content into the data array:
$data = array();
......
......@@ -1120,8 +1120,8 @@ class InlineElement {
$parentRecord = $this->getRecord(0, $parent['table'], $parent['uid']);
$cmd = array();
$cmd[$parent['table']][$parent['uid']]['inlineLocalizeSynchronize'] = $parent['field'] . ',' . $type;
/** @var \TYPO3\CMS\Core\DataHandler\DataHandler */
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
/** @var \TYPO3\CMS\Core\DataHandling\DataHandler */
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = FALSE;
$tce->start(array(), $cmd);
$tce->process_cmdmap();
......@@ -2203,7 +2203,7 @@ class InlineElement {
* Update expanded/collapsed states on new inline records if any.
*
* @param array $uc The uc array to be processed and saved (by reference)
* @param \TYPO3\CMS\Core\DataHandler\DataHandler $tce Instance of TCEmain that saved data before
* @param \TYPO3\CMS\Core\DataHandling\DataHandler $tce Instance of TCEmain that saved data before
* @return void
* @todo Define visibility
*/
......
......@@ -225,7 +225,7 @@ class RecordHistory {
}
// Writes the data:
if ($cmdmapArray) {
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = 0;
$tce->debug = 0;
$tce->dontProcessTransformations = 1;
......@@ -260,7 +260,7 @@ class RecordHistory {
// Removing fields:
$data = $this->removeFilefields($rollbackData[0], $data);
// Writes the data:
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = 0;
$tce->debug = 0;
$tce->dontProcessTransformations = 1;
......
......@@ -195,8 +195,8 @@ final class Commands {
* @throws RuntimeException if an error happened while the TCE processing
*/
static protected function processTceCmdAndDataMap(array $cmd, array $data = array()) {
/** @var $tce \TYPO3\CMS\Core\DataHandler\DataHandler */
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
/** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = 0;
$tce->start($data, $cmd);
$tce->copyTree = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($GLOBALS['BE_USER']->uc['copyLevels'], 0, 100);
......
......@@ -359,8 +359,8 @@ abstract class AbstractRecordCollection implements \TYPO3\CMS\Core\Collection\Re
if ($this->getIdentifier() == 0) {
$data[trim(static::$storageTableName)][$uid]['pid'] = 0;
}
/** @var \TYPO3\CMS\Core\DataHandler\DataHandler $tce */
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
/** @var \TYPO3\CMS\Core\DataHandling\DataHandler $tce */
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = 0;
$tce->start($data, array());
$tce->process_datamap();
......
<?php
namespace TYPO3\CMS\Core\DataHandler;
namespace TYPO3\CMS\Core\DataHandling;
/***************************************************************
* Copyright notice
......@@ -18,7 +18,6 @@ namespace TYPO3\CMS\Core\DataHandler;
* A copy is found in the textfile GPL.txt and important notices to the license
* from the author is found in LICENSE.txt distributed with these scripts.
*
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
......@@ -486,7 +485,7 @@ class DataHandler {
* The outer most instance of t3lib_TCEmain
* (t3lib_TCEmain instantiates itself on versioning and localization)
*
* @var \TYPO3\CMS\Core\DataHandler\DataHandler
* @var \TYPO3\CMS\Core\DataHandling\DataHandler
*/
protected $outerMostInstance = NULL;
......@@ -907,8 +906,8 @@ class DataHandler {
$id = $WSversion['uid'];
$recordAccess = TRUE;
} elseif ($this->BE_USER->workspaceAllowAutoCreation($table, $id, $theRealPid)) {
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
/** @var $tce \TYPO3\CMS\Core\DataHandler\DataHandler */
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
/** @var $tce \TYPO3\CMS\Core\DataHandling\DataHandler */
$tce->stripslashes_values = 0;
// Setting up command for creating a new version of the record:
$cmd = array();
......@@ -1812,7 +1811,7 @@ class DataHandler {
foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processUpload'] as $classRef) {
$hookObject = \TYPO3\CMS\Core\Utility\GeneralUtility::getUserObj($classRef);
if (!$hookObject instanceof \TYPO3\CMS\Core\DataHandling\DataHandlerProcessUploadHookInterface) {
throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Core\\DataHandler\\DataHandlerProcessUploadHookInterface', 1279962349);
throw new \UnexpectedValueException('$hookObject must implement interface TYPO3\\CMS\\Core\\DataHandling\\DataHandlerProcessUploadHookInterface', 1279962349);
}
$hookObject->processUpload_postProcessAction($theDestFile, $this);
}
......@@ -2810,8 +2809,8 @@ class DataHandler {
$data[$table][$theNewID][$GLOBALS['TCA'][$table]['ctrl']['origUid']] = $uid;
}
// Do the copy by simply submitting the array through TCEmain:
/** @var $copyTCE \TYPO3\CMS\Core\DataHandler\DataHandler */
$copyTCE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
/** @var $copyTCE \TYPO3\CMS\Core\DataHandling\DataHandler */
$copyTCE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$copyTCE->stripslashes_values = 0;
$copyTCE->copyTree = $this->copyTree;
// Copy forth the cached TSconfig
......@@ -3775,8 +3774,8 @@ class DataHandler {
}
} else {
// Create new record:
/** @var $copyTCE \TYPO3\CMS\Core\DataHandler\DataHandler */
$copyTCE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
/** @var $copyTCE \TYPO3\CMS\Core\DataHandling\DataHandler */
$copyTCE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
// Copy forth the cached TSconfig
$copyTCE->stripslashes_values = 0;
$copyTCE->cachedTSconfig = $this->cachedTSconfig;
......@@ -3890,7 +3889,7 @@ class DataHandler {
$this->registerDBList[$table][$id][$field] = $value;
// Remove child records (if synchronization requested it):
if (is_array($removeArray) && count($removeArray)) {
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = FALSE;
$tce->start(array(), $removeArray);
$tce->process_cmdmap();
......@@ -6850,13 +6849,13 @@ class DataHandler {
* Since t3lib_TCEmain can create nested objects of itself,
* this method helps to determine the first (= outer most) one.
*
* @return \TYPO3\CMS\Core\DataHandler\DataHandler
* @return \TYPO3\CMS\Core\DataHandling\DataHandler
*/
protected function getOuterMostInstance() {
if (!isset($this->outerMostInstance)) {
$stack = array_reverse(debug_backtrace());
foreach ($stack as $stackItem) {
if (isset($stackItem['object']) && $stackItem['object'] instanceof \TYPO3\CMS\Core\DataHandler\DataHandler) {
if (isset($stackItem['object']) && $stackItem['object'] instanceof \TYPO3\CMS\Core\DataHandling\DataHandler) {
$this->outerMostInstance = $stackItem['object'];
break;
}
......
......@@ -40,10 +40,10 @@ interface DataHandlerCheckModifyAccessListHookInterface
*
* @param boolean &$accessAllowed Whether the user has access to modify a table
* @param string $table The name of the table to be modified
* @param \TYPO3\CMS\Core\DataHandler\DataHandler $parent The calling parent object
* @param \TYPO3\CMS\Core\DataHandling\DataHandler $parent The calling parent object
* @return void
*/
public function checkModifyAccessList(&$accessAllowed, $table, \TYPO3\CMS\Core\DataHandler\DataHandler $parent);
public function checkModifyAccessList(&$accessAllowed, $table, \TYPO3\CMS\Core\DataHandling\DataHandler $parent);
}
......
......@@ -40,10 +40,10 @@ interface DataHandlerProcessUploadHookInterface
* Post-process a file upload.
*
* @param string $filename The uploaded file
* @param \TYPO3\CMS\Core\DataHandler\DataHandler $parentObject Parent t3lib_TCEmain object
* @param \TYPO3\CMS\Core\DataHandling\DataHandler $parentObject Parent t3lib_TCEmain object
* @return void
*/
public function processUpload_postProcessAction(&$filename, \TYPO3\CMS\Core\DataHandler\DataHandler $parentObject);
public function processUpload_postProcessAction(&$filename, \TYPO3\CMS\Core\DataHandling\DataHandler $parentObject);
}
......
......@@ -543,7 +543,7 @@ class QueryView {
*/
public function resultRowDisplay($row, $conf, $table) {
static $even = FALSE;
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$SET = $GLOBALS['SOBE']->MOD_SETTINGS;
$out = '<tr class="bgColor' . ($even ? '6' : '4') . '">';
$even = !$even;
......
......@@ -639,7 +639,7 @@ class ReferenceIndex {
return $dataArray;
} else {
// Execute CMD array:
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$tce->stripslashes_values = FALSE;
$tce->dontProcessTransformations = TRUE;
$tce->bypassWorkspaceRestrictions = TRUE;
......
......@@ -577,7 +577,7 @@ class FrontendEditingController {
*/
protected function initializeTceMain() {
if (!isset($this->tce)) {
$this->tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler');
$this->tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
$this->tce->stripslashes_values = 0;
}
}
......
......@@ -53,10 +53,10 @@ class FileExtensionFilter {
* Entry method for use as TCEMain "inline" field filter
*
* @param array $parameters
* @param \TYPO3\CMS\Core\DataHandler\DataHandler $tceMain
* @param \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain
* @return array
*/
public function filterInlineChildren(array $parameters, \TYPO3\CMS\Core\DataHandler\DataHandler $tceMain) {
public function filterInlineChildren(array $parameters, \TYPO3\CMS\Core\DataHandling\DataHandler $tceMain) {
$values = $parameters['values'];
if ($parameters['allowedFileExtensions']) {
$this->setAllowedFileExtensions($parameters['allowedFileExtensions']);
......
......@@ -218,7 +218,7 @@ return array(
't3lib_softrefproc' => 'TYPO3\\CMS\\Core\\Database\\SoftReferenceIndex',
't3lib_sqlparser' => 'TYPO3\\CMS\\Core\\Database\\SqlParser',
't3lib_extTables_PostProcessingHook' => 'TYPO3\\CMS\\Core\\Database\\TableConfigurationPostProcessingHookInterface',
't3lib_TCEmain' => 'TYPO3\\CMS\\Core\\DataHandler\\DataHandler',
't3lib_TCEmain' => 'TYPO3\\CMS\\Core\\DataHandling\\DataHandler',
't3lib_TCEmain_checkModifyAccessListHook' => 'TYPO3\\CMS\\Core\\DataHandling\\DataHandlerCheckModifyAccessListHookInterface',
't3lib_TCEmain_processUploadHook' => 'TYPO3\\CMS\\Core\\DataHandling\\DataHandlerProcessUploadHookInterface',
't3lib_browseLinksHook' => 'TYPO3\\CMS\\Core\\ElementBrowser\\ElementBrowserHookInterface',
......
......@@ -24,7 +24,7 @@ namespace TYPO3\CMS\Core\Tests\Unit\DataHandler;
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Testcase for TYPO3\CMS\Core\DataHandler\DataHandler
* Testcase for TYPO3\CMS\Core\DataHandling\DataHandler
*
* @package TYPO3
* @subpackage t3lib
......@@ -61,7 +61,7 @@ class DataHandlerTest extends \tx_phpunit_testcase {
protected $singletonInstances = array();
/**
* @var \TYPO3\CMS\Core\DataHandler\DataHandler
* @var \TYPO3\CMS\Core\DataHandling\DataHandler
*/
private $fixture;
......@@ -74,7 +74,7 @@ class DataHandlerTest extends \tx_phpunit_testcase {
$this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
$this->databaseBackup = $GLOBALS['TYPO3_DB'];
$this->backEndUser = $this->getMock('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
$this->fixture = new \TYPO3\CMS\Core\DataHandler\DataHandler();
$this->fixture = new \TYPO3\CMS\Core\DataHandling\DataHandler();
$this->fixture->start(array(), '', $this->backEndUser);
}
......@@ -91,7 +91,7 @@ class DataHandlerTest extends \tx_phpunit_testcase {
* @test
*/
public function fixtureCanBeCreated() {
$this->assertTrue($this->fixture instanceof \TYPO3\CMS\Core\DataHandler\DataHandler);
$this->assertTrue($this->fixture instanceof \TYPO3\CMS\Core\DataHandling\DataHandler);
}
//////////////////////////////////////////
......@@ -207,7 +207,7 @@ class DataHandlerTest extends \tx_phpunit_testcase {
$hookClass = uniqid('tx_coretest');
eval('
class ' . $hookClass . ' implements \\TYPO3\\CMS\\Core\\DataHandling\\DataHandlerCheckModifyAccessListHookInterface {
public function checkModifyAccessList(&$accessAllowed, $table, \\TYPO3\\CMS\\Core\\DataHandler\\DataHandler $parent) { $accessAllowed = TRUE; }
public function checkModifyAccessList(&$accessAllowed, $table, \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $parent) { $accessAllowed = TRUE; }
}
');
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['checkModifyAccessList'][] = $hookClass;
......@@ -221,7 +221,7 @@ class DataHandlerTest extends \tx_phpunit_testcase {
* @test
*/
public function processDatamapForFrozenNonZeroWorkspaceReturnsFalse() {
$fixture = $this->getMock('TYPO3\\CMS\\Core\\DataHandler\\DataHandler', array('newlog'));
$fixture = $this->getMock('TYPO3\\CMS\\Core\\DataHandling\\DataHandler', array('newlog'));
$this->backEndUser->workspace = 1;
$this->backEndUser->workspaceRec = array('freeze' => TRUE);
$fixture->BE_USER = $this->backEndUser;
......@@ -236,8 +236,8 @@ class DataHandlerTest extends \tx_phpunit_testcase {
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'] = array();
$GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection');
/** @var $fixture \TYPO3\CMS\Core\DataHandler\DataHandler|\tx_phpunit_testcase */
$fixture = $this->getMock('TYPO3\\CMS\\Core\\DataHandler\\DataHandler', array('newlog', 'checkModifyAccessList', 'tableReadOnly', 'checkRecordUpdateAccess'));
/** @var $fixture \TYPO3\CMS\Core\DataHandling\DataHandler|\tx_phpunit_testcase */
$fixture = $this->getMock('TYPO3\\CMS\\Core\\DataHandling\\DataHandler', array('newlog', 'checkModifyAccessList', 'tableReadOnly', 'checkRecordUpdateAccess'));
$fixture->bypassWorkspaceRestrictions = FALSE;
$fixture->datamap = array(
'pages' => array(
......@@ -256,7 +256,7 @@ class DataHandlerTest extends \tx_phpunit_testcase {
$backEndUser->expects($this->once())->method('workspaceCannotEditRecord')->will($this->returnValue(TRUE));
$backEndUser->expects($this->once())->method('recordEditAccessInternals')->with('pages', 1)->will($this->returnValue(TRUE));
$fixture->BE_USER = $backEndUser;
$createdTceMain = $this->getMock('TYPO3\\CMS\\Core\\DataHandler\\DataHandler', array());
$createdTceMain = $this->getMock('TYPO3\\CMS\\Core\\DataHandling\\DataHandler', array());
$createdTceMain->expects($this->once())->method('start')->with(array(), array(
'pages' => array(
1 => array(
......@@ -270,7 +270,7 @@ class DataHandlerTest extends \tx_phpunit_testcase {
));
$createdTceMain->expects($this->never())->method('process_datamap');
$createdTceMain->expects($this->once())->method('process_cmdmap');
\TYPO3\CMS\Core\Utility\GeneralUtility::addInstance('TYPO3\\CMS\\Core\\DataHandler\\DataHandler', $createdTceMain);
\TYPO3\CMS\Core\Utility\GeneralUtility::addInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler', $createdTceMain);
$fixture->process_datamap();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment