[TASK] Add first functional tests for DataHandler 71/23171/5
authorTymoteusz Motylewski <t.motylewski@gmail.com>
Sun, 18 Aug 2013 08:08:12 +0000 (10:08 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sun, 18 Aug 2013 10:09:16 +0000 (12:09 +0200)
The patch introduces some common database fixtures that can be
re-used between tests. Two base functional tests in core
data handler are activated and another one in workspace.

Functional test xml is changed to execute all core and workspace
tests. Most of them are not working yet and marked as incomplete
for new.

Resolves: #51151
Releases: 6.2
Change-Id: Ic8e3da4f1064689e6ea7ef2365b0f8b1a3ce91f4
Reviewed-on: https://review.typo3.org/23171
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Tymoteusz Motylewski
Tested-by: Tymoteusz Motylewski
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
22 files changed:
typo3/sysext/core/Build/FunctionalTests.xml
typo3/sysext/core/Tests/BaseTestCase.php
typo3/sysext/core/Tests/Functional/Category/Collection/CategoryCollectionTest.php
typo3/sysext/core/Tests/Functional/DataHandling/DataHandlerTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/pages.xml [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/pages_language_overlay.xml [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/sys_language.xml [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Fixtures/tt_content.xml [new file with mode: 0644]
typo3/sysext/core/Tests/Functional/Functional/FunctionalTestCaseTest.php [deleted file]
typo3/sysext/core/Tests/Functional/Resource/BaseTestCase.php
typo3/sysext/core/Tests/Functional/Resource/Driver/LocalDriverTest.php
typo3/sysext/core/Tests/Functional/Resource/FolderTest.php
typo3/sysext/core/Tests/Functional/Resource/ResourceStorageTest.php
typo3/sysext/core/Tests/Functional/Utility/File/ExtendedFileUtilityTest.php
typo3/sysext/workspaces/Tests/Functional/DataHandling/DataHandlerTest.php [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/Fixtures/pages.xml [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/Fixtures/sys_workspace.xml [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/Service/Fixtures/dbMovedContent.xml [new file with mode: 0644]
typo3/sysext/workspaces/Tests/Functional/Service/WorkspaceTest.php
typo3/sysext/workspaces/Tests/Functional/Service/fixtures/dbDefaultPages.xml [deleted file]
typo3/sysext/workspaces/Tests/Functional/Service/fixtures/dbDefaultWorkspaces.xml [deleted file]
typo3/sysext/workspaces/Tests/Functional/Service/fixtures/dbMovedContent.xml [deleted file]

index 99a22f1..ec76c62 100644 (file)
 >
        <testsuites>
                <testsuite name="EXT:core tests">
-                       <directory>../../../../typo3/sysext/core/Tests/Functional/Functional/</directory>
+                       <directory>../../../../typo3/sysext/core/Tests/Functional/</directory>
+               </testsuite>
+               <testsuite name="EXT:workspaces tests">
+                       <directory>../../../../typo3/sysext/workspaces/Tests/Functional/</directory>
                </testsuite>
        </testsuites>
 </phpunit>
index 134afdf..6925173 100644 (file)
@@ -48,23 +48,6 @@ abstract class BaseTestCase extends \PHPUnit_Framework_TestCase {
        protected $backupStaticAttributes = FALSE;
 
        /**
-        * Returns absolute path to the Fixture folder if called with empty
-        * $relativeFixturePath, returns path to a fixture file otherwise.
-        *
-        * Fixtures are expected to be located in a sub-folder called "Fixtures"
-        * below the test case PHP file.
-        *
-        * @param string $relativeFixtureFile
-        * @return string Absolute path with trailing slash
-        */
-       protected function getFixturePath($relativeFixtureFile = '') {
-               $reflectionClass = new \ReflectionClass(get_class($this));
-               $fileLocationOfTestClass = $reflectionClass->getFileName();
-               $path = dirname($fileLocationOfTestClass) . '/Fixtures/' . $relativeFixtureFile;
-               return $path;
-       }
-
-       /**
         * Creates a mock object which allows for calling protected methods and access of protected properties.
         *
         * @param string $originalClassName name of class to create the mock object of, must not be empty
index 3c3dd57..5cc33ec 100644 (file)
@@ -29,7 +29,7 @@ namespace TYPO3\CMS\Core\Tests\Functional\Category\Collection;
  *
  * @author Fabien Udriot <fabien.udriot@typo3.org>
  */
-class CategoryCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
+class CategoryCollectionTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
 
        /**
         * @var \TYPO3\CMS\Core\Category\Collection\CategoryCollection
@@ -77,6 +77,7 @@ class CategoryCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function setUp() {
+               $this->markTestIncomplete('needs to be fixed');
                $this->database = $GLOBALS['TYPO3_DB'];
                $this->fixture = new \TYPO3\CMS\Core\Category\Collection\CategoryCollection($this->tableName);
                $this->collectionRecord = array(
@@ -100,6 +101,9 @@ class CategoryCollectionTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * @return void
         */
        public function tearDown() {
+               // Disabled for now
+               return;
+
                $this->testingFramework->cleanUp();
                // clean up environment
                $this->dropDummyTable();
diff --git a/typo3/sysext/core/Tests/Functional/DataHandling/DataHandlerTest.php b/typo3/sysext/core/Tests/Functional/DataHandling/DataHandlerTest.php
new file mode 100644 (file)
index 0000000..66de152
--- /dev/null
@@ -0,0 +1,123 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Functional\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\Database\DatabaseConnection;
+use TYPO3\CMS\Core\DataHandling\DataHandler;
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
+/**
+ * Functional test for the DataHandler
+ */
+class DataHandlerTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
+
+       public function setUp() {
+               parent::setUp();
+
+               /** @var $backendUser \TYPO3\CMS\Core\Authentication\BackendUserAuthentication */
+               $backendUser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
+               $backendUser->user['admin'] = 1;
+               $GLOBALS['BE_USER'] = $backendUser;
+               \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/pages.xml');
+       }
+
+       /**
+        * @test
+        */
+       public function canCreateTtContent() {
+               $dataHandler = $this->getDataHandler();
+
+               $temporaryId = uniqid('NEW');
+               $dataArray = array(
+                       'tt_content' => array(
+                               $temporaryId => array(
+                                       'pid' => 1,
+                                       'header' => "Test Title",
+                               )
+                       )
+               );
+
+               $dataHandler->start($dataArray, array());
+               $dataHandler->process_datamap();
+               $uid = $dataHandler->substNEWwithIDs[$temporaryId];
+
+               $this->assertGreaterThanOrEqual(1, $uid);
+
+               /** @var DatabaseConnection $database */
+               $database = $GLOBALS['TYPO3_DB'];
+               $row = $database->exec_SELECTgetSingleRow('*', 'tt_content', 'uid = ' . $uid);
+               $this->assertNotEmpty($row);
+
+               $this->assertEquals($dataArray['tt_content'][$temporaryId]['pid'], $row['pid']);
+               $this->assertEquals($dataArray['tt_content'][$temporaryId]['header'], $row['header']);
+               $this->assertEquals($uid, $row['uid']);
+       }
+
+       /**
+        * @test
+        */
+       public function canLocalizeTtContent() {
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/sys_language.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/pages_language_overlay.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/tt_content.xml');
+
+               $dataHandler = $this->getDataHandler();
+               $originalRecordId  = 1;
+               $languageRecordUid = 1;
+
+               $commandMap = array(
+                       'tt_content' => array(
+                               $originalRecordId => array(
+                                       'localize' => $languageRecordUid
+                               )
+                       )
+               );
+
+               $dataHandler->start(array(), $commandMap);
+               $dataHandler->process_cmdmap();
+               $uid = $dataHandler->copyMappingArray_merged['tt_content'][$originalRecordId];
+               $this->assertGreaterThanOrEqual(2, $uid);
+
+               /** @var DatabaseConnection $database */
+               $database = $GLOBALS['TYPO3_DB'];
+               $row = $database->exec_SELECTgetSingleRow('*', 'tt_content', 'uid = ' . $uid);
+               $this->assertNotEmpty($row);
+
+               $this->assertEquals(1, $row['pid']);
+               $this->assertContains('Test content', $row['header']);
+               $this->assertEquals($uid, $row['uid']);
+               $this->assertEquals(1, $row['l18n_parent']);
+       }
+
+       /**
+        * @return \TYPO3\CMS\Core\DataHandling\DataHandler
+        */
+       protected function getDataHandler() {
+               $dataHandler = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');
+               return $dataHandler;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/pages.xml b/typo3/sysext/core/Tests/Functional/Fixtures/pages.xml
new file mode 100644 (file)
index 0000000..73f707e
--- /dev/null
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="utf-8"?>
+<dataset>
+       <pages>
+               <uid>1</uid>
+               <pid>0</pid>
+               <title>Root</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>2</uid>
+               <pid>1</pid>
+               <title>Dummy 1-2</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>3</uid>
+               <pid>2</pid>
+               <title>Dummy 1-2-3</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>4</uid>
+               <pid>3</pid>
+               <title>Dummy 1-2-3-4</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>5</uid>
+               <pid>1</pid>
+               <title>Dummy 1-5</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>6</uid>
+               <pid>5</pid>
+               <title>Dummy 1-5-6</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+</dataset>
\ No newline at end of file
diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/pages_language_overlay.xml b/typo3/sysext/core/Tests/Functional/Fixtures/pages_language_overlay.xml
new file mode 100644 (file)
index 0000000..a85fc9a
--- /dev/null
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<dataset>
+    <pages_language_overlay>
+        <uid>1</uid>
+        <pid>1</pid>
+        <title>Root [Dansk]</title>
+        <deleted>0</deleted>
+        <hidden>0</hidden>
+        <sys_language_uid>1</sys_language_uid>
+    </pages_language_overlay>
+    <pages_language_overlay>
+        <uid>2</uid>
+        <pid>1</pid>
+        <title>Root [Deutsch]</title>
+        <deleted>0</deleted>
+        <hidden>0</hidden>
+        <sys_language_uid>2</sys_language_uid>
+    </pages_language_overlay>
+</dataset>
\ No newline at end of file
diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/sys_language.xml b/typo3/sysext/core/Tests/Functional/Fixtures/sys_language.xml
new file mode 100644 (file)
index 0000000..d28a551
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8"?>
+<dataset>
+    <sys_language>
+        <uid>1</uid>
+        <pid>0</pid>
+        <tstamp>1277119475</tstamp>
+        <hidden>0</hidden>
+        <title>Dansk</title>
+        <flag>dk</flag>
+        <static_lang_isocode>0</static_lang_isocode>
+    </sys_language>
+    <sys_language>
+        <uid>2</uid>
+        <pid>0</pid>
+        <tstamp>1277119475</tstamp>
+        <hidden>0</hidden>
+        <title>Deutsch</title>
+        <flag>de</flag>
+        <static_lang_isocode>0</static_lang_isocode>
+    </sys_language>
+</dataset>
\ No newline at end of file
diff --git a/typo3/sysext/core/Tests/Functional/Fixtures/tt_content.xml b/typo3/sysext/core/Tests/Functional/Fixtures/tt_content.xml
new file mode 100644 (file)
index 0000000..49ceb10
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="utf-8"?>
+<dataset>
+    <tt_content>
+        <uid>1</uid>
+        <pid>1</pid>
+        <header>Test content</header>
+        <deleted>0</deleted>
+        <t3ver_oid>0</t3ver_oid>
+        <t3ver_wsid>0</t3ver_wsid>
+    </tt_content>
+</dataset>
\ No newline at end of file
diff --git a/typo3/sysext/core/Tests/Functional/Functional/FunctionalTestCaseTest.php b/typo3/sysext/core/Tests/Functional/Functional/FunctionalTestCaseTest.php
deleted file mode 100644 (file)
index eeadad9..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-namespace TYPO3\CMS\Core\Tests\Functional\Functional;
-
-/***************************************************************
- * Copyright notice
- *
- * (c) 2013 Christian Kuhn <lolli@schwarzbu.ch>
- * 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!
- ***************************************************************/
-
-/**
- * Test functional test case
- */
-class FunctionalTestCaseTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
-
-       /**
-        * @test Tests if setUp() and tearDown() of FunctionalTestCase are working
-        */
-       public function setUpTearDownSuccessful() {
-               $this->assertTrue(TRUE);
-       }
-}
-?>
\ No newline at end of file
index 834ec14..e0796ba 100644 (file)
@@ -32,7 +32,7 @@ namespace TYPO3\CMS\Core\Tests\Functional\Resource;
  *
  * @author Andreas Wolf <andreas.wolf@typo3.org>
  */
-class BaseTestCase extends \TYPO3\CMS\Core\Tests\Unit\Resource\BaseTestCase {
+class BaseTestCase extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
        public function getStorageObject() {
                $this->initializeVfs();
                $resourceFactory = new \TYPO3\CMS\Core\Resource\ResourceFactory();
index f0f25cb..0a7bc49 100644 (file)
@@ -37,6 +37,13 @@ require_once dirname(dirname(__FILE__)) . '/BaseTestCase.php';
 class LocalDriverTest extends \TYPO3\CMS\Core\Tests\Functional\Resource\BaseTestCase {
 
        /**
+        * Set up
+        */
+       public function setUp() {
+               $this->markTestIncomplete('needs to be fixed');
+       }
+
+       /**
         * @test
         */
        public function foldersCanBeCopiedWithinSameStorage() {
index 991ac24..4acf9f0 100644 (file)
@@ -37,6 +37,13 @@ use TYPO3\CMS\Core\Resource;
 class FolderTest extends BaseTestCase {
 
        /**
+        * Set up
+        */
+       public function setUp() {
+               $this->markTestIncomplete('needs to be fixed');
+       }
+
+       /**
         * Helper method for testing restore of filters in the storage
         *
         * @param $filterMode
index cd199c7..7d6982d 100644 (file)
@@ -32,13 +32,20 @@ namespace TYPO3\CMS\Core\Tests\Functional\Resource;
  *
  * @author Andreas Wolf <andreas.wolf@ikt-werk.de>
  */
-class ResourceStorageTest extends \TYPO3\CMS\Core\Tests\Unit\Resource\BaseTestCase {
+class ResourceStorageTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
 
        /**
         * @var \TYPO3\CMS\Core\Resource\ResourceStorage
         */
        protected $fixture;
 
+       /**
+        * Set up
+        */
+       public function setUp() {
+               $this->markTestIncomplete('needs to be fixed');
+       }
+
        protected function prepareFixture() {
                $this->initializeVfs();
                $driver = new \TYPO3\CMS\Core\Resource\Driver\LocalDriver(array('pathType' => 'absolute', 'basePath' => $this->getMountRootUrl()));
@@ -52,6 +59,7 @@ class ResourceStorageTest extends \TYPO3\CMS\Core\Tests\Unit\Resource\BaseTestCa
         * @test
         */
        public function fileListingsDoNotContainHiddenFilesWithDefaultFilters() {
+
                // we cannot use fixture->createFile() because touch() does not work with vfsStream
                $this->addToMount(array('someFile' => '', '.someHiddenFile' => ''));
                $this->prepareFixture();
index 4acf92b..cff0664 100644 (file)
@@ -28,7 +28,7 @@ namespace TYPO3\CMS\Core\Tests\Functional\Utility\File;
  *
  * @author Fabien Udriot <fabien.udriot@ecodev.ch>
  */
-class ExtendedFileUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
+class ExtendedFileUtilityTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
 
        /**
         * @var array A backup of registered singleton instances
@@ -84,6 +84,7 @@ class ExtendedFileUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * Sets up this testcase
         */
        public function setUp() {
+               $this->markTestIncomplete('needs to be fixed');
                $this->singletonInstances = \TYPO3\CMS\Core\Utility\GeneralUtility::getSingletonInstances();
                \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances();
 
@@ -103,6 +104,9 @@ class ExtendedFileUtilityTest extends \TYPO3\CMS\Core\Tests\UnitTestCase {
         * Tears down this testcase
         */
        public function tearDown() {
+               // Disabled for now
+               return;
+
                foreach ($this->objectsToTearDown as $object) {
                        if ($object instanceof \TYPO3\CMS\Core\Resource\File || $object instanceof \TYPO3\CMS\Core\Resource\Folder) {
                                $object->delete();
diff --git a/typo3/sysext/workspaces/Tests/Functional/DataHandling/DataHandlerTest.php b/typo3/sysext/workspaces/Tests/Functional/DataHandling/DataHandlerTest.php
new file mode 100644 (file)
index 0000000..b4036b4
--- /dev/null
@@ -0,0 +1,106 @@
+<?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;
+               $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(dirname(__FILE__) . '/../Fixtures/pages.xml');
+       }
+
+       /**
+        * @test
+        */
+       public function canChangeTtContentInTheWorkspace() {
+               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Fixtures/tt_content.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../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);
+
+               /** @var \TYPO3\CMS\Core\Database\DatabaseConnection $database */
+               $database = $GLOBALS['TYPO3_DB'];
+               $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;
+       }
+}
+?>
\ No newline at end of file
diff --git a/typo3/sysext/workspaces/Tests/Functional/Fixtures/pages.xml b/typo3/sysext/workspaces/Tests/Functional/Fixtures/pages.xml
new file mode 100644 (file)
index 0000000..e7407ab
--- /dev/null
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="utf-8"?>
+<dataset>
+       <pages>
+               <uid>102</uid>
+               <pid>-1</pid>
+               <title>Dummy WS 91</title>
+               <t3ver_oid>2</t3ver_oid>
+               <t3ver_stage>1</t3ver_stage>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_count>0</t3ver_count>
+               <deleted>0</deleted>
+       </pages>
+       <pages>
+               <uid>202</uid>
+               <pid>-1</pid>
+               <title>Dummy WS 92</title>
+               <t3ver_oid>2</t3ver_oid>
+               <t3ver_stage>1</t3ver_stage>
+               <t3ver_wsid>92</t3ver_wsid>
+               <t3ver_count>0</t3ver_count>
+               <deleted>0</deleted>
+       </pages>
+       <pages>
+               <uid>104</uid>
+               <pid>-1</pid>
+               <title>Dummy WS 91</title>
+               <t3ver_oid>4</t3ver_oid>
+               <t3ver_stage>2</t3ver_stage>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_count>0</t3ver_count>
+               <deleted>0</deleted>
+       </pages>
+       <pages>
+               <uid>105</uid>
+               <pid>-1</pid>
+               <title>Dummy WS 91</title>
+               <t3ver_oid>6</t3ver_oid>
+               <t3ver_stage>1</t3ver_stage>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_count>1</t3ver_count>
+               <deleted>0</deleted>
+       </pages>
+       <pages>
+               <uid>106</uid>
+               <pid>-1</pid>
+               <title>Dummy WS 91</title>
+               <t3ver_oid>6</t3ver_oid>
+               <t3ver_stage>2</t3ver_stage>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_count>1</t3ver_count>
+               <deleted>0</deleted>
+       </pages>
+</dataset>
\ No newline at end of file
diff --git a/typo3/sysext/workspaces/Tests/Functional/Fixtures/sys_workspace.xml b/typo3/sysext/workspaces/Tests/Functional/Fixtures/sys_workspace.xml
new file mode 100644 (file)
index 0000000..fc2e75f
--- /dev/null
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="utf-8"?>
+<dataset>
+       <sys_workspace>
+               <uid>90</uid>
+               <pid>0</pid>
+               <title>Empty Workspace</title>
+       </sys_workspace>
+       <sys_workspace>
+               <uid>91</uid>
+               <pid>0</pid>
+               <title>Filled Workspace #1</title>
+       </sys_workspace>
+       <sys_workspace>
+               <uid>92</uid>
+               <pid>0</pid>
+               <title>Filled Workspace #2</title>
+       </sys_workspace>
+</dataset>
\ No newline at end of file
diff --git a/typo3/sysext/workspaces/Tests/Functional/Service/Fixtures/dbMovedContent.xml b/typo3/sysext/workspaces/Tests/Functional/Service/Fixtures/dbMovedContent.xml
new file mode 100644 (file)
index 0000000..ad2c46a
--- /dev/null
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="utf-8"?>
+<dataset>
+       <pages>
+               <uid>1</uid>
+               <pid>0</pid>
+               <title>Root</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>2</uid>
+               <pid>1</pid>
+               <title>Dummy 1-2</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>3</uid>
+               <pid>2</pid>
+               <title>Dummy 1-2-3 - to be moved</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>4</uid>
+               <pid>3</pid>
+               <title>Dummy 1-2-3-4</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>5</uid>
+               <pid>1</pid>
+               <title>Dummy 1-5</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>6</uid>
+               <pid>5</pid>
+               <title>Dummy 1-5-6</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+       <pages>
+               <uid>7</uid>
+               <pid>5</pid>
+               <title>Dummy 1-5-7</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+       </pages>
+
+       <pages>
+               <uid>103</uid>
+               <pid>-1</pid>
+               <title>Dummy 1-2-3 - "move from placeholder"</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+               <t3ver_oid>3</t3ver_oid>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_state>4</t3ver_state>
+               <t3ver_stage>1</t3ver_stage>
+               <t3ver_move_id>0</t3ver_move_id>
+       </pages>
+       <pages>
+               <uid>203</uid>
+               <pid>5</pid>
+               <title>Dummy 1-2-3 - "move to placeholder"</title>
+               <deleted>0</deleted>
+               <perms_everybody>15</perms_everybody>
+               <t3ver_oid>0</t3ver_oid>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_state>3</t3ver_state>
+               <t3ver_stage>0</t3ver_stage>
+               <t3ver_move_id>3</t3ver_move_id>
+       </pages>
+
+       <tt_content>
+               <uid>5</uid>
+               <pid>7</pid>
+               <header>Content - to be moved from page 7 to page 1</header>
+               <deleted>0</deleted>
+               <t3ver_oid>0</t3ver_oid>
+               <t3ver_wsid>0</t3ver_wsid>
+       </tt_content>
+
+       <tt_content>
+               <uid>105</uid>
+               <pid>-1</pid>
+               <header>Content - "move from placeholder"</header>
+               <deleted>0</deleted>
+               <t3ver_oid>5</t3ver_oid>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_state>4</t3ver_state>
+               <t3ver_stage>1</t3ver_stage>
+               <t3ver_move_id>0</t3ver_move_id>
+       </tt_content>
+
+       <tt_content>
+               <uid>205</uid>
+               <pid>1</pid>
+               <header>Content - "move to placeholder"</header>
+               <deleted>0</deleted>
+               <t3ver_oid>0</t3ver_oid>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_state>3</t3ver_state>
+               <t3ver_stage>0</t3ver_stage>
+               <t3ver_move_id>5</t3ver_move_id>
+       </tt_content>
+
+       <tt_content>
+               <uid>6</uid>
+               <pid>2</pid>
+               <header>Content - to be moved from page 2 to page 7</header>
+               <deleted>0</deleted>
+               <t3ver_oid>0</t3ver_oid>
+               <t3ver_wsid>0</t3ver_wsid>
+       </tt_content>
+
+       <tt_content>
+               <uid>106</uid>
+               <pid>-1</pid>
+               <header>Content - "move from placeholder"</header>
+               <deleted>0</deleted>
+               <t3ver_oid>6</t3ver_oid>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_state>4</t3ver_state>
+               <t3ver_stage>1</t3ver_stage>
+               <t3ver_move_id>0</t3ver_move_id>
+       </tt_content>
+
+       <tt_content>
+               <uid>206</uid>
+               <pid>7</pid>
+               <header>Content - "move to placeholder"</header>
+               <deleted>0</deleted>
+               <t3ver_oid>0</t3ver_oid>
+               <t3ver_wsid>91</t3ver_wsid>
+               <t3ver_state>3</t3ver_state>
+               <t3ver_stage>0</t3ver_stage>
+               <t3ver_move_id>6</t3ver_move_id>
+       </tt_content>
+</dataset>
\ No newline at end of file
index 45e4b12..90b4f3f 100644 (file)
@@ -26,38 +26,37 @@ namespace TYPO3\CMS\Workspaces\Tests\Functional\Service;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
+use TYPO3\CMS\Core\Utility\GeneralUtility;
+
 /**
  * Workspace service test
  *
  * @author Workspaces Team (http://forge.typo3.org/projects/show/typo3v4-workspaces)
  */
-class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
-
-       /**
+class WorkspacesServiceTest extends \TYPO3\CMS\Core\Tests\FunctionalTestCase {
 
-        */
-       public function setUp() {
-               $GLOBALS['BE_USER']->user['admin'] = 1;
-               $this->createDatabase();
-               $db = $this->useTestDatabase();
-               $this->importStdDB();
-               $this->importExtensions(array('cms', 'version', 'workspaces'));
-       }
+       protected $coreExtensionsToLoad = array('version', 'workspaces');
 
        /**
-
+        * Set up
         */
-       public function tearDown() {
-               $this->cleanDatabase();
-               $this->dropDatabase();
-               $GLOBALS['TYPO3_DB']->sql_select_db(TYPO3_db);
+       public function setUp() {
+               $this->markTestIncomplete('needs to be fixed');
+               parent::setUp();
+               /** @var $backendUser \TYPO3\CMS\Core\Authentication\BackendUserAuthentication */
+               $backendUser = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Authentication\\BackendUserAuthentication');
+               $backendUser->user['admin'] = 1;
+               $GLOBALS['BE_USER'] = $backendUser;
+               \TYPO3\CMS\Core\Core\Bootstrap::getInstance()->initializeLanguageObject();
+
+               $this->importDataSet(dirname(__FILE__) . '/Fixtures/dbDefaultWorkspaces.xml');
        }
 
        /**
         * @test
         */
        public function emptyWorkspaceReturnsEmptyArray() {
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
                $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
                $result = $service->selectVersionsInWorkspace(90);
                $this->assertTrue(empty($result), 'The workspace 90 contains no changes and the result was supposed to be empty');
@@ -68,8 +67,8 @@ class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
         * @test
         */
        public function versionsFromSpecificWorkspaceCanBeFound() {
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
+               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Functional/Fixtures/pages.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/dbDefaultPages.xml');
                $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 2);
                $this->assertTrue(is_array($result), 'The result from workspace 91 is supposed to be an array');
@@ -82,8 +81,8 @@ class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
         * @test
         */
        public function versionsFromAllWorkspaceCanBeFound() {
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
+               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Functional/Fixtures/pages.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/dbDefaultPages.xml');
                $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
                $result = $service->selectVersionsInWorkspace(\TYPO3\CMS\Workspaces\Service\WorkspaceService::SELECT_ALL_WORKSPACES, 0, -99, 2);
                $this->assertTrue(is_array($result), 'The result from workspace 91 is supposed to be an array');
@@ -94,8 +93,8 @@ class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
         * @test
         */
        public function versionsCanBeFoundRecursive() {
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
+               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Functional/Fixtures/pages.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/dbDefaultPages.xml');
                $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 1, 99);
                $this->assertTrue(is_array($result), 'The result from workspace 91 is supposed to be an array');
@@ -106,8 +105,8 @@ class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
         * @test
         */
        public function versionsCanBeFilteredToSpecificStage() {
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
+               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Functional/Fixtures/pages.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/dbDefaultPages.xml');
                $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
                // testing stage 1
                $result = $service->selectVersionsInWorkspace(91, 0, 1, 1, 99);
@@ -127,8 +126,8 @@ class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
         * @test
         */
        public function versionsCanBeFilteredToSpecificLifecycleStep() {
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultPages.xml');
+               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Functional/Fixtures/pages.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/dbDefaultPages.xml');
                $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
                // testing all "draft" records
                $result = $service->selectVersionsInWorkspace(91, 1, -99, 1, 99);
@@ -149,8 +148,8 @@ class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
         * @test
         */
        public function movedElementsCanNotBeFoundAtTheirOrigin() {
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbMovedContent.xml');
+               $this->importDataSet(ORIGINAL_ROOT . 'typo3/sysext/core/Tests/Functional/Functional/Fixtures/pages.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/dbMovedContent.xml');
                // Test if the placeholder can be found when we ask using recursion (same result)
                $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 2, 99);
@@ -162,8 +161,7 @@ class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
         * @test
         */
        public function movedElementsCanBeFoundAtTheirDestination() {
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbMovedContent.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/dbMovedContent.xml');
                // Test if the placeholder can be found when we ask using recursion (same result)
                $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 5, 99);
@@ -181,8 +179,7 @@ class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
         * @test
         */
        public function movedElementsCanBeFoundUsingTheirLiveUID() {
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbDefaultWorkspaces.xml');
-               $this->importDataSet(dirname(__FILE__) . '/fixtures/dbMovedContent.xml');
+               $this->importDataSet(dirname(__FILE__) . '/../Fixtures/dbMovedContent.xml');
                // Test if the placeholder can be found when we ask using recursion (same result)
                $service = new \TYPO3\CMS\Workspaces\Service\WorkspaceService();
                $result = $service->selectVersionsInWorkspace(91, 0, -99, 3, 99);
@@ -190,8 +187,5 @@ class WorkspacesServiceTest extends \tx_phpunit_database_testcase {
                $this->assertEquals(1, sizeof($result['pages']), 'Wrong amount of page versions found within workspace 91');
                $this->assertEquals(103, $result['pages'][0]['uid'], 'Wrong move-to pointer found for page 3 in workspace 91');
        }
-
 }
-
-
-?>
+?>
\ No newline at end of file
diff --git a/typo3/sysext/workspaces/Tests/Functional/Service/fixtures/dbDefaultPages.xml b/typo3/sysext/workspaces/Tests/Functional/Service/fixtures/dbDefaultPages.xml
deleted file mode 100644 (file)
index 09f1ccc..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-       <pages>
-               <uid>1</uid>
-               <pid>0</pid>
-               <title>Root</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>2</uid>
-               <pid>1</pid>
-               <title>Dummy 1-2</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>3</uid>
-               <pid>2</pid>
-               <title>Dummy 1-2-3</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>4</uid>
-               <pid>3</pid>
-               <title>Dummy 1-2-3-4</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>5</uid>
-               <pid>1</pid>
-               <title>Dummy 1-5</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>6</uid>
-               <pid>5</pid>
-               <title>Dummy 1-5-6</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-
-       <pages>
-               <uid>102</uid>
-               <pid>-1</pid>
-               <title>Dummy WS 91</title>
-               <t3ver_oid>2</t3ver_oid>
-               <t3ver_stage>1</t3ver_stage>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_count>0</t3ver_count>
-               <deleted>0</deleted>
-       </pages>
-       <pages>
-               <uid>202</uid>
-               <pid>-1</pid>
-               <title>Dummy WS 92</title>
-               <t3ver_oid>2</t3ver_oid>
-               <t3ver_stage>1</t3ver_stage>
-               <t3ver_wsid>92</t3ver_wsid>
-               <t3ver_count>0</t3ver_count>
-               <deleted>0</deleted>
-       </pages>
-       <pages>
-               <uid>104</uid>
-               <pid>-1</pid>
-               <title>Dummy WS 91</title>
-               <t3ver_oid>4</t3ver_oid>
-               <t3ver_stage>2</t3ver_stage>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_count>0</t3ver_count>
-               <deleted>0</deleted>
-       </pages>
-       <pages>
-               <uid>105</uid>
-               <pid>-1</pid>
-               <title>Dummy WS 91</title>
-               <t3ver_oid>6</t3ver_oid>
-               <t3ver_stage>1</t3ver_stage>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_count>1</t3ver_count>
-               <deleted>0</deleted>
-       </pages>
-       <pages>
-               <uid>106</uid>
-               <pid>-1</pid>
-               <title>Dummy WS 91</title>
-               <t3ver_oid>6</t3ver_oid>
-               <t3ver_stage>2</t3ver_stage>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_count>1</t3ver_count>
-               <deleted>0</deleted>
-       </pages>
-</dataset>
\ No newline at end of file
diff --git a/typo3/sysext/workspaces/Tests/Functional/Service/fixtures/dbDefaultWorkspaces.xml b/typo3/sysext/workspaces/Tests/Functional/Service/fixtures/dbDefaultWorkspaces.xml
deleted file mode 100644 (file)
index fc2e75f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-       <sys_workspace>
-               <uid>90</uid>
-               <pid>0</pid>
-               <title>Empty Workspace</title>
-       </sys_workspace>
-       <sys_workspace>
-               <uid>91</uid>
-               <pid>0</pid>
-               <title>Filled Workspace #1</title>
-       </sys_workspace>
-       <sys_workspace>
-               <uid>92</uid>
-               <pid>0</pid>
-               <title>Filled Workspace #2</title>
-       </sys_workspace>
-</dataset>
\ No newline at end of file
diff --git a/typo3/sysext/workspaces/Tests/Functional/Service/fixtures/dbMovedContent.xml b/typo3/sysext/workspaces/Tests/Functional/Service/fixtures/dbMovedContent.xml
deleted file mode 100644 (file)
index ad2c46a..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<dataset>
-       <pages>
-               <uid>1</uid>
-               <pid>0</pid>
-               <title>Root</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>2</uid>
-               <pid>1</pid>
-               <title>Dummy 1-2</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>3</uid>
-               <pid>2</pid>
-               <title>Dummy 1-2-3 - to be moved</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>4</uid>
-               <pid>3</pid>
-               <title>Dummy 1-2-3-4</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>5</uid>
-               <pid>1</pid>
-               <title>Dummy 1-5</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>6</uid>
-               <pid>5</pid>
-               <title>Dummy 1-5-6</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-       <pages>
-               <uid>7</uid>
-               <pid>5</pid>
-               <title>Dummy 1-5-7</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-       </pages>
-
-       <pages>
-               <uid>103</uid>
-               <pid>-1</pid>
-               <title>Dummy 1-2-3 - "move from placeholder"</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-               <t3ver_oid>3</t3ver_oid>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_state>4</t3ver_state>
-               <t3ver_stage>1</t3ver_stage>
-               <t3ver_move_id>0</t3ver_move_id>
-       </pages>
-       <pages>
-               <uid>203</uid>
-               <pid>5</pid>
-               <title>Dummy 1-2-3 - "move to placeholder"</title>
-               <deleted>0</deleted>
-               <perms_everybody>15</perms_everybody>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_state>3</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_move_id>3</t3ver_move_id>
-       </pages>
-
-       <tt_content>
-               <uid>5</uid>
-               <pid>7</pid>
-               <header>Content - to be moved from page 7 to page 1</header>
-               <deleted>0</deleted>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_wsid>0</t3ver_wsid>
-       </tt_content>
-
-       <tt_content>
-               <uid>105</uid>
-               <pid>-1</pid>
-               <header>Content - "move from placeholder"</header>
-               <deleted>0</deleted>
-               <t3ver_oid>5</t3ver_oid>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_state>4</t3ver_state>
-               <t3ver_stage>1</t3ver_stage>
-               <t3ver_move_id>0</t3ver_move_id>
-       </tt_content>
-
-       <tt_content>
-               <uid>205</uid>
-               <pid>1</pid>
-               <header>Content - "move to placeholder"</header>
-               <deleted>0</deleted>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_state>3</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_move_id>5</t3ver_move_id>
-       </tt_content>
-
-       <tt_content>
-               <uid>6</uid>
-               <pid>2</pid>
-               <header>Content - to be moved from page 2 to page 7</header>
-               <deleted>0</deleted>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_wsid>0</t3ver_wsid>
-       </tt_content>
-
-       <tt_content>
-               <uid>106</uid>
-               <pid>-1</pid>
-               <header>Content - "move from placeholder"</header>
-               <deleted>0</deleted>
-               <t3ver_oid>6</t3ver_oid>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_state>4</t3ver_state>
-               <t3ver_stage>1</t3ver_stage>
-               <t3ver_move_id>0</t3ver_move_id>
-       </tt_content>
-
-       <tt_content>
-               <uid>206</uid>
-               <pid>7</pid>
-               <header>Content - "move to placeholder"</header>
-               <deleted>0</deleted>
-               <t3ver_oid>0</t3ver_oid>
-               <t3ver_wsid>91</t3ver_wsid>
-               <t3ver_state>3</t3ver_state>
-               <t3ver_stage>0</t3ver_stage>
-               <t3ver_move_id>6</t3ver_move_id>
-       </tt_content>
-</dataset>
\ No newline at end of file