[TASK] Remove functional workspaces DataHandlerTest 88/28288/2
authorOliver Hader <oliver@typo3.org>
Wed, 12 Mar 2014 10:35:40 +0000 (11:35 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Wed, 12 Mar 2014 11:32:57 +0000 (12:32 +0100)
DataHandling::canChangeTtContentInTheWorkspace() is now covered
by DataHandling\Regular\Modify\ActionTest::modifyContent() with
additional assertions. The mentioned test class can be removed.

Resolves: #56805
Releases: 6.2
Change-Id: I968c593f50cd7453db87e1c4fe9e0478cf045381
Reviewed-on: https://review.typo3.org/28288
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
typo3/sysext/workspaces/Tests/Functional/DataHandling/DataHandlerTest.php [deleted file]

diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/DataHandlerTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/DataHandlerTest.php
deleted file mode 100644 (file)
index 8d9051b..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-<?php
-namespace TYPO3\CMS\Workspaces\Tests\Functional\DataHandling;
-
-/***************************************************************
- * Copyright notice
- *
- * (c) 2013 Tymoteusz Motylewski <t.motylewski@gmail.com>
- * All rights reserved
- *
- * This script is part of the TYPO3 project. The TYPO3 project is
- * free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * The GNU General Public License can be found at
- * http://www.gnu.org/copyleft/gpl.html.
- *
- * 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
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-
-use TYPO3\CMS\Core\Utility\GeneralUtility;
-
-/**
- * Functional test for the DataHandler
- */
-class DataHandlerTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
-
-       protected $coreExtensionsToLoad = array('version', 'workspaces');
-
-       public function setUp() {
-               parent::setUp();
-
-               /** @var $backendUser \TYPO3\CMS\Core\Authentication\BackendUserAuthentication */
-               $backendUser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
-               $backendUser->user['admin'] = 1;
-               $backendUser->user['uid'] = 1;
-               $GLOBALS['BE_USER'] = $backendUser;
-               \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
-
-               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Fixtures/pages.xml');
-               $this->importDataSet(__DIR__ . '/../Fixtures/pages.xml');
-       }
-
-       /**
-        * @test
-        */
-       public function canChangeTtContentInTheWorkspace() {
-               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Fixtures/tt_content.xml');
-               $this->importDataSet(__DIR__ . '/../Fixtures/sys_workspace.xml');
-
-               $workspaceId = 90;
-               /** @var $backendUser \TYPO3\CMS\Core\Authentication\BackendUserAuthentication */
-               $backendUser = $GLOBALS['BE_USER'];
-               $backendUser->workspace = $workspaceId;
-
-               $dataHandler = $this->getDataHandler();
-               $uid = 1;
-               $dataArray = array(
-                       'tt_content' => array(
-                               $uid => array(
-                                       'header' => "Test Title [workspace 90]",
-                               )
-                       )
-               );
-
-               $dataHandler->start($dataArray, array());
-               $dataHandler->process_datamap();
-
-               $versionedId = $dataHandler->getAutoVersionId('tt_content', $uid);
-
-               $database = $this->getDatabase();
-               $row = $database->exec_SELECTgetSingleRow('*', 'tt_content', 'uid = ' . $versionedId);
-               $this->assertNotEmpty($row);
-
-               $this->assertEquals($versionedId, $row['uid']);
-               $this->assertEquals(-1, $row['pid']);
-               $this->assertEquals("Test Title [workspace $workspaceId]", $row['header']);
-               $this->assertEquals(0, $row['l18n_parent'], 'wrong l18n_parent');
-               $this->assertEquals(1, $row['t3_origuid'], 'wrong t3_origuid');
-
-               $this->assertEquals($uid, $row['t3ver_oid']);
-               $this->assertEquals(1, $row['t3ver_id']); // first version of this record
-               $this->assertEquals($workspaceId, $row['t3ver_wsid']);
-               $this->assertEquals('Auto-created for WS #' . $workspaceId, $row['t3ver_label']);
-               $this->assertEquals(0, $row['t3ver_state']);
-               $this->assertEquals(0, $row['t3ver_stage']);
-               $this->assertEquals(0, $row['t3ver_count']);
-               $this->assertEquals(0, $row['t3ver_tstamp']); //last published date
-               $this->assertEquals(0, $row['t3ver_move_id']);
-       }
-
-       /**
-        * @return \TYPO3\CMS\Core\DataHandling\DataHandler
-        */
-       protected function getDataHandler() {
-               $dataHandler = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
-               return $dataHandler;
-       }
-}