[TASK] Namespace and move t3lib unit tests - 5
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 4 Sep 2012 17:06:49 +0000 (19:06 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 9 Sep 2012 15:16:35 +0000 (17:16 +0200)
This patch moves most unit tests of the tests/Unit/t3lib/*
directory to the core extension, following the new name scheme.

Change-Id: Ia08a3c0251c577676e3920dc880bb54e1651e5c2
Resolves: #40620
Related: #40095
Releases: 6.0
Reviewed-on: http://review.typo3.org/14339
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
33 files changed:
tests/Unit/t3lib/mail/class.t3lib_mail_mailerTest.php [deleted file]
tests/Unit/t3lib/mail/class.t3lib_mail_swiftmaileradapterTest.php [deleted file]
tests/Unit/t3lib/matchcondition/class.t3lib_matchcondition_backendTest.php [deleted file]
tests/Unit/t3lib/matchcondition/class.t3lib_matchcondition_frontendTest.php [deleted file]
tests/Unit/t3lib/tree/class.t3lib_tree_nodeTest.php [deleted file]
tests/Unit/t3lib/tree/class.t3lib_tree_nodecollectionTest.php [deleted file]
tests/Unit/t3lib/tree/class.t3lib_tree_sortednodecollectionTest.php [deleted file]
tests/Unit/t3lib/tree/fixtures/serialized.txt [deleted file]
tests/Unit/t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataproviderTest.php [deleted file]
tests/Unit/t3lib/utility/class.t3lib_utility_arrayTest.php [deleted file]
tests/Unit/t3lib/utility/class.t3lib_utility_clientTest.php [deleted file]
tests/Unit/t3lib/utility/class.t3lib_utility_httpTest.php [deleted file]
tests/Unit/t3lib/utility/class.t3lib_utility_mailTest.php [deleted file]
tests/Unit/t3lib/utility/class.t3lib_utility_pathTest.php [deleted file]
tests/Unit/t3lib/utility/class.t3lib_utility_stringTest.php [deleted file]
tests/Unit/t3lib/utility/class.t3lib_utility_versionNumberTest.php [deleted file]
typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Tree/Fixtures/serialized.txt [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Tree/Pagetree/DataProviderTest.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Tree/SortedTreeNodeCollectionTest.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Tree/TreeNodeCollectionTest.php [new file with mode: 0644]
typo3/sysext/backend/Tests/Unit/Tree/TreeNodeTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Mail/MailerTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Mail/SwiftMailerAdapterTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/ClientUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/HttpUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/MailUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/MathUtilityTest.php
typo3/sysext/core/Tests/Unit/Utility/PathUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/StringUtilityTest.php [new file with mode: 0644]
typo3/sysext/core/Tests/Unit/Utility/VersionNumberUtilityTest.php [new file with mode: 0644]
typo3/sysext/frontend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php [new file with mode: 0644]

diff --git a/tests/Unit/t3lib/mail/class.t3lib_mail_mailerTest.php b/tests/Unit/t3lib/mail/class.t3lib_mail_mailerTest.php
deleted file mode 100644 (file)
index 92c230b..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2011 Ernesto Baschny (ernst@cron-it.de)
- * 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!
- ***************************************************************/
-/**
- * Testcase for the t3lib_mail_Mailer class.
- *
- * @package TYPO3
- * @subpackage t3lib
- * @author Helmut Hummel <helmut.hummel@typo3.org>
- */
-class t3lib_mail_MailerTest extends tx_phpunit_testcase {
-
-       /**
-        * @var \TYPO3\CMS\Core\Mail\Mailer
-        */
-       protected $fixture;
-
-       /**
-        * @var array
-        */
-       protected $globalMailSettings;
-
-       public function setUp() {
-               $this->globalMailSettings = $GLOBALS['TYPO3_CONF_VARS']['MAIL'];
-               $this->fixture = $this->getMock('TYPO3\\CMS\\Core\\Mail\\Mailer', array('noMethodMocked'), array(), '', FALSE);
-       }
-
-       public function tearDown() {
-               unset($this->fixture);
-               $GLOBALS['TYPO3_CONF_VARS']['MAIL'] = $this->globalMailSettings;
-       }
-
-       //////////////////////////
-       // Tests concerning t3lib_mail_Mailer
-       //////////////////////////
-       /**
-        * @test
-        */
-       public function injectedSettingsAreNotReplacedByGlobalSettings() {
-               $settings = array('transport' => 'mbox', 'transport_mbox_file' => '/path/to/file');
-               $GLOBALS['TYPO3_CONF_VARS']['MAIL'] = array('transport' => 'sendmail', 'transport_sendmail_command' => 'sendmail');
-               $this->fixture->injectMailSettings($settings);
-               $this->fixture->__construct();
-               $this->assertAttributeSame($settings, 'mailSettings', $this->fixture);
-       }
-
-       /**
-        * @test
-        */
-       public function globalSettingsAreUsedIfNoSettingsAreInjected() {
-               $settings = ($GLOBALS['TYPO3_CONF_VARS']['MAIL'] = array('transport' => 'sendmail', 'transport_sendmail_command' => 'sendmail'));
-               $this->fixture->__construct();
-               $this->assertAttributeSame($settings, 'mailSettings', $this->fixture);
-       }
-
-       /**
-        * Data provider for wrongConfigigurationThrowsException
-        *
-        * @return array Data sets
-        */
-       static public function wrongConfigigurationProvider() {
-               return array(
-                       'smtp but no host' => array(array('transport' => 'smtp')),
-                       'sendmail but no command' => array(array('transport' => 'sendmail')),
-                       'mbox but no file' => array(array('transport' => 'mbox')),
-                       'no instance of Swift_Transport' => array(array('transport' => 'TYPO3\\CMS\\Core\\Messaging\\ErrorpageMessage'))
-               );
-       }
-
-       /**
-        * @test
-        * @param $settings
-        * @dataProvider wrongConfigigurationProvider
-        * @expectedException \TYPO3\CMS\Core\Exception
-        */
-       public function wrongConfigigurationThrowsException($settings) {
-               $this->fixture->injectMailSettings($settings);
-               $this->fixture->__construct();
-       }
-
-       /**
-        * @test
-        */
-       public function providingCorrectClassnameDoesNotThrowException() {
-               if (!class_exists('t3lib_mail_SwiftMailerFakeTransport')) {
-                       // Create fake custom transport class
-                       eval('class t3lib_mail_SwiftMailerFakeTransport extends \\TYPO3\\CMS\\Core\\Mail\\MboxTransport {
-                               public function __construct($settings) {}
-                       }');
-               }
-               $this->fixture->injectMailSettings(array('transport' => 't3lib_mail_SwiftMailerFakeTransport'));
-               $this->fixture->__construct();
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/mail/class.t3lib_mail_swiftmaileradapterTest.php b/tests/Unit/t3lib/mail/class.t3lib_mail_swiftmaileradapterTest.php
deleted file mode 100644 (file)
index e3ce16a..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2011 Ernesto Baschny (ernst@cron-it.de)
- * 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!
- ***************************************************************/
-/**
- * Testcase for the t3lib_mail_SwiftMailerAdapter class.
- *
- * @package TYPO3
- * @subpackage t3lib
- * @author Ernesto Baschny <ernst@cron-it.de>
- */
-class t3lib_mail_SwiftMailerAdapterTest extends tx_phpunit_testcase {
-
-       /**
-        * @var \TYPO3\CMS\Core\Mail\SwiftMailerAdapter
-        */
-       protected $fixture;
-
-       public function setUp() {
-               if (!class_exists('t3lib_mail_SwiftMailerAdapterExposed')) {
-                       // Make protected methods accessible so that they can be tested:
-                       eval('class t3lib_mail_SwiftMailerAdapterExposed extends \\TYPO3\\CMS\\Core\\Mail\\SwiftMailerAdapter {
-                               public function parseAddressesExposed($args) {
-                                       return $this->parseAddresses($args);
-                               }
-                       }');
-               }
-               $this->fixture = new t3lib_mail_SwiftMailerAdapterExposed();
-       }
-
-       public function tearDown() {
-
-       }
-
-       //////////////////////////
-       // Tests concerning mail
-       //////////////////////////
-       /**
-        * Data provider for parseAddressesTest
-        *
-        * @return array Data sets
-        */
-       static public function parseAddressesProvider() {
-               return array(
-                       'name &ltemail&gt;' => array('name <email@example.org>', array('email@example.org' => 'name')),
-                       '&lt;email&gt;' => array('<email@example.org>', array('email@example.org')),
-                       'email' => array('email@example.org', array('email@example.org')),
-                       'email1,email2' => array('email1@example.org,email2@example.com', array('email1@example.org', 'email2@example.com')),
-                       'name &ltemail&gt;,email2' => array('name <email1@example.org>,email2@example.com', array('email1@example.org' => 'name', 'email2@example.com')),
-                       '"last, first" &lt;name@example.org&gt;' => array('"last, first" <email@example.org>', array('email@example.org' => '"last, first"')),
-                       'email,name &ltemail&gt;,"last, first" &lt;name@example.org&gt;' => array(
-                               'email1@example.org, name <email2@example.org>, "last, first" <email3@example.org>',
-                               array(
-                                       'email1@example.org',
-                                       'email2@example.org' => 'name',
-                                       'email3@example.org' => '"last, first"'
-                               )
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider parseAddressesProvider
-        */
-       public function parseAddressesTest($source, $addressList) {
-               $this->assertEquals($addressList, $this->fixture->parseAddressesExposed($source));
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/matchcondition/class.t3lib_matchcondition_backendTest.php b/tests/Unit/t3lib/matchcondition/class.t3lib_matchcondition_backendTest.php
deleted file mode 100644 (file)
index 1c17cc2..0000000
+++ /dev/null
@@ -1,990 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2009-2011 Oliver Hader <oliver@typo3.org>
- *  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!
- ***************************************************************/
-/**
- * Testcase for class t3lib_matchCondition_frontend.
- *
- * @author     Oliver Hader <oliver@typo3.org>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_matchCondition_backendTest extends tx_phpunit_testcase {
-
-       /**
-        * @var         array
-        */
-       private $backupGlobalVariables;
-
-       /**
-        * @var         array
-        */
-       private $rootline;
-
-       /**
-        * @var         t3lib_matchCondition_backend
-        */
-       private $matchCondition;
-
-       /**
-        * @var         string
-        */
-       private $testTableName;
-
-       public function setUp() {
-               $this->backupGlobalVariables = array(
-                       '_ENV' => $_ENV,
-                       '_GET' => $_GET,
-                       '_POST' => $_POST,
-                       '_SERVER' => $_SERVER,
-                       'TCA' => $GLOBALS['TCA'],
-                       'TYPO3_DB' => $GLOBALS['TYPO3_DB'],
-                       'TYPO3_CONF_VARS' => $GLOBALS['TYPO3_CONF_VARS'],
-                       'T3_VAR' => $GLOBALS['T3_VAR'],
-                       'BE_USER' => $GLOBALS['BE_USER'],
-                       'SOBE' => $GLOBALS['SOBE']
-               );
-               $this->testTableName = 'TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher_testTable';
-               $this->testGlobalNamespace = uniqid('TEST');
-               $GLOBALS['TCA'][$this->testTableName] = array('ctrl' => array());
-               $GLOBALS[$this->testGlobalNamespace] = array();
-               $this->setUpBackend();
-               $this->matchCondition = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher');
-       }
-
-       public function tearDown() {
-               foreach ($this->backupGlobalVariables as $key => $data) {
-                       $GLOBALS[$key] = $data;
-               }
-               unset($this->matchCondition);
-               unset($this->backupGlobalVariables);
-               unset($GLOBALS[$this->testGlobalNamespace]);
-       }
-
-       private function setUpBackend() {
-               $this->rootline = array(
-                       2 => array('uid' => 121, 'pid' => 111),
-                       1 => array('uid' => 111, 'pid' => 101),
-                       0 => array('uid' => 101, 'pid' => 0)
-               );
-               $GLOBALS['BE_USER'] = $this->getMock('beUserAuth', array(), array(), '', FALSE);
-       }
-
-       private function setUpDatabaseMockForDeterminePageId() {
-               $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array('exec_SELECTquery', 'sql_fetch_assoc', 'sql_free_result'));
-               $GLOBALS['TYPO3_DB']->expects($this->any())->method('exec_SELECTquery')->will($this->returnCallback(array($this, 'determinePageIdByRecordDatabaseExecuteCallback')));
-               $GLOBALS['TYPO3_DB']->expects($this->any())->method('sql_fetch_assoc')->will($this->returnCallback(array($this, 'determinePageIdByRecordDatabaseFetchCallback')));
-       }
-
-       /**
-        * Tests whether a faulty expression fails.
-        *
-        * @test
-        */
-       public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {
-               $this->matchCondition->matchAll = FALSE;
-               $this->assertFalse($this->matchCondition->match('[nullCondition = This expression would return FALSE in general]'));
-       }
-
-       /**
-        * Tests whether simulating positive matches for all conditions succeeds.
-        *
-        * @test
-        */
-       public function simulateEnabledMatchAllConditionsSucceeds() {
-               $this->matchCondition->setSimulateMatchResult(TRUE);
-               $this->assertTrue($this->matchCondition->match('[nullCondition = This expression would return FALSE in general]'));
-       }
-
-       /**
-        * Tests whether simulating positive matches for specific conditions succeeds.
-        *
-        * @test
-        */
-       public function simulateEnabledMatchSpecificConditionsSucceeds() {
-               $testCondition = ('[' . uniqid('test')) . ' = Any condition to simulate a positive match]';
-               $this->matchCondition->setSimulateMatchConditions(array($testCondition));
-               $this->assertTrue($this->matchCondition->match($testCondition));
-       }
-
-       /**
-        * Tests whether a condition matches Internet Explorer 7 on Windows.
-        *
-        * @return      void
-        * @test
-        */
-       public function conditionMatchesInternetExplorer7Windows() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)';
-               $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does not match Internet Explorer 7 on Windows.
-        *
-        * @return      void
-        * @test
-        */
-       public function conditionDoesNotMatchInternetExplorer7Windows() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Opera/9.25 (Windows NT 6.0; U; en)';
-               $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]');
-               $this->assertFalse($result);
-       }
-
-       /**
-        * Tests whether a condition does match the iOS with the correct and more recent 'iOS'
-        *
-        * @test
-        */
-       public function conditionDoesMatchIosWithCorrectSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10';
-               $result = $this->matchCondition->match('[system = iOS]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match the iOS with the old 'mac'
-        *
-        * @test
-        */
-       public function conditionDoesMatchIosWithOldSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10';
-               $result = $this->matchCondition->match('[system = mac]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Windows 2000 with the correct and more recent 'win2k'
-        *
-        * @test
-        */
-       public function conditionDoesMatchWindows2kWithNewSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)';
-               $result = $this->matchCondition->match('[system = win2k]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Windows 2000 with the old 'winNT'
-        *
-        * @test
-        */
-       public function conditionDoesMatchWindows2kWithOldSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)';
-               $result = $this->matchCondition->match('[system = winNT]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Windows NT with 'winNT'
-        *
-        * @test
-        */
-       public function conditionDoesMatchWindowsNtWithSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)';
-               $result = $this->matchCondition->match('[system = winNT]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Android with the correct and more recent 'android'
-        *
-        * @test
-        */
-       public function conditionDoesMatchAndroidWithNewSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
-               $result = $this->matchCondition->match('[system = android]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Android with the old 'linux'
-        *
-        * @test
-        */
-       public function conditionDoesMatchAndroidWithOldSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
-               $result = $this->matchCondition->match('[system = linux]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a device type condition matches a crawler.
-        *
-        * @test
-        */
-       public function deviceConditionMatchesRobot() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Googlebot/2.1 (+http://www.google.com/bot.html)';
-               $result = $this->matchCondition->match('[device = robot]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a device type condition does not match a crawler.
-        *
-        * @test
-        */
-       public function deviceConditionDoesNotMatchRobot() {
-               $_SERVER['HTTP_USER_AGENT'] = md5('Some strange user agent');
-               $result = $this->matchCondition->match('[device = robot]');
-               $this->assertFalse($result);
-       }
-
-       /**
-        * Tests whether the language comparison matches.
-        *
-        * @test
-        */
-       public function languageConditionMatchesSingleLanguageExpression() {
-               $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
-               $this->assertTrue($this->matchCondition->match('[language = *de*]'));
-               $this->assertTrue($this->matchCondition->match('[language = *de-de*]'));
-       }
-
-       /**
-        * Tests whether the language comparison matches.
-        *
-        * @test
-        */
-       public function languageConditionMatchesMultipleLanguagesExpression() {
-               $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
-               $this->assertTrue($this->matchCondition->match('[language = *en*,*de*]'));
-               $this->assertTrue($this->matchCondition->match('[language = *en-us*,*de-de*]'));
-       }
-
-       /**
-        * Tests whether the language comparison matches.
-        *
-        * @test
-        */
-       public function languageConditionMatchesCompleteLanguagesExpression() {
-               $this->markTestSkipped('This comparison seems to be incomplete in t3lib_matchCondition.');
-               $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
-               $this->assertTrue($this->matchCondition->match('[language = de-de,de;q=0.8]'));
-       }
-
-       /**
-        * Tests whether usergroup comparison matches.
-        *
-        * @test
-        */
-       public function usergroupConditionMatchesSingleGroupId() {
-               $GLOBALS['BE_USER']->groupList = '13,14,15';
-               $this->assertTrue($this->matchCondition->match('[usergroup = 13]'));
-       }
-
-       /**
-        * Tests whether usergroup comparison matches.
-        *
-        * @test
-        */
-       public function usergroupConditionMatchesMultipleUserGroupId() {
-               $GLOBALS['BE_USER']->groupList = '13,14,15';
-               $this->assertTrue($this->matchCondition->match('[usergroup = 999,15,14,13]'));
-       }
-
-       /**
-        * Tests whether user comparison matches.
-        *
-        * @test
-        */
-       public function loginUserConditionMatchesAnyLoggedInUser() {
-               $GLOBALS['BE_USER']->user['uid'] = 13;
-               $this->assertTrue($this->matchCondition->match('[loginUser = *]'));
-       }
-
-       /**
-        * Tests whether user comparison matches.
-        *
-        * @test
-        */
-       public function loginUserConditionMatchesSingleLoggedInUser() {
-               $GLOBALS['BE_USER']->user['uid'] = 13;
-               $this->assertTrue($this->matchCondition->match('[loginUser = 13]'));
-       }
-
-       /**
-        * Tests whether user comparison matches.
-        *
-        * @test
-        */
-       public function loginUserConditionDoesNotMatchSingleLoggedInUser() {
-               $GLOBALS['BE_USER']->user['uid'] = 13;
-               $this->assertFalse($this->matchCondition->match('[loginUser = 999]'));
-       }
-
-       /**
-        * Tests whether user comparison matches.
-        *
-        * @test
-        */
-       public function loginUserConditionMatchesMultipleLoggedInUsers() {
-               $GLOBALS['BE_USER']->user['uid'] = 13;
-               $this->assertTrue($this->matchCondition->match('[loginUser = 999,13]'));
-       }
-
-       /**
-        * Tests whether checkinf for an admin user matches
-        *
-        * @test
-        */
-       public function adminUserConditionMatchesAdminUser() {
-               $GLOBALS['BE_USER']->user['uid'] = 13;
-               $GLOBALS['BE_USER']->user['admin'] = 1;
-               $this->assertTrue($this->matchCondition->match('[adminUser = 1]'));
-       }
-
-       /**
-        * Tests whether checkinf for an admin user matches
-        *
-        * @test
-        */
-       public function adminUserConditionMatchesRegularUser() {
-               $GLOBALS['BE_USER']->user['uid'] = 14;
-               $GLOBALS['BE_USER']->user['admin'] = 0;
-               $this->assertTrue($this->matchCondition->match('[adminUser = 0]'));
-       }
-
-       /**
-        * Tests whether checkinf for an admin user matches
-        *
-        * @test
-        */
-       public function adminUserConditionDoesNotMatchRegularUser() {
-               $GLOBALS['BE_USER']->user['uid'] = 14;
-               $GLOBALS['BE_USER']->user['admin'] = 0;
-               $this->assertFalse($this->matchCondition->match('[adminUser = 1]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 = 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 = 10.1]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 == 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 == 10.1]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnEqualExpressionWithMultipleValues() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 = 10|20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 = 10.1|20.2|30.3]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 = 10|20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20.2 = 10.1|20.2|30.3]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 == 10|20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 == 10.1|20.2|30.3]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 == 10|20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20.2 == 10.1|20.2|30.3]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnNotEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 != 20]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 != 10.2]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnNotEqualExpressionWithMultipleValues() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 != 20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 != 10.2|20.3]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnLowerThanExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 < 20]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 < 10.2]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnLowerThanOrEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 <= 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 <= 20]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 <= 10.1]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 <= 10.2]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnGreaterThanExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 > 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.2 > 10.1]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnGreaterThanOrEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 >= 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 >= 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 >= 10.1]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.2 >= 10.1]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnEmptyExpressionWithNoValueSet() {
-               $testKey = uniqid('test');
-               $this->assertTrue($this->matchCondition->match(('[globalVar = GP:' . $testKey) . '=]'));
-               $this->assertTrue($this->matchCondition->match(('[globalVar = GP:' . $testKey) . ' = ]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero() {
-               $testKey = uniqid('test');
-               $_GET = array();
-               $_POST = array($testKey => 0);
-               $this->assertFalse($this->matchCondition->match(('[globalVar = GP:' . $testKey) . '=]'));
-               $this->assertFalse($this->matchCondition->match(('[globalVar = GP:' . $testKey) . ' = ]'));
-       }
-
-       /**
-        * Tests whether string comparison matches.
-        *
-        * @test
-        */
-       public function globalStringConditionMatchesOnEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3.Test.Condition]'));
-               $this->assertFalse($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3]'));
-       }
-
-       /**
-        * Tests whether string comparison matches.
-        *
-        * @test
-        */
-       public function globalStringConditionMatchesWildcardExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3?Test?Condition]'));
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3.T*t.Condition]'));
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3?T*t?Condition]'));
-       }
-
-       /**
-        * Tests whether string comparison matches.
-        *
-        * @test
-        */
-       public function globalStringConditionMatchesRegularExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = /^[A-Za-z3.]+$/]'));
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = /^TYPO3\\..+Condition$/]'));
-               $this->assertFalse($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = /^FALSE/]'));
-       }
-
-       /**
-        * Tests whether string comparison matches.
-        *
-        * @test
-        */
-       public function globalStringConditionMatchesEmptyRegularExpression() {
-               $testKey = uniqid('test');
-               $_SERVER[$testKey] = '';
-               $this->assertTrue($this->matchCondition->match(('[globalString = _SERVER|' . $testKey) . ' = /^$/]'));
-       }
-
-       /**
-        * Tests whether treeLevel comparison matches.
-        *
-        * @test
-        */
-       public function treeLevelConditionMatchesSingleValue() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->assertTrue($this->matchCondition->match('[treeLevel = 2]'));
-       }
-
-       /**
-        * Tests whether treeLevel comparison matches.
-        *
-        * @test
-        */
-       public function treeLevelConditionMatchesMultipleValues() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->assertTrue($this->matchCondition->match('[treeLevel = 999,998,2]'));
-       }
-
-       /**
-        * Tests whether treeLevel comparison matches.
-        *
-        * @test
-        */
-       public function treeLevelConditionDoesNotMatchFaultyValue() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->assertFalse($this->matchCondition->match('[treeLevel = 999]'));
-       }
-
-       /**
-        * Tests whether treeLevel comparison matches when creating new pages.
-        *
-        * @test
-        */
-       public function treeLevelConditionMatchesCurrentPageIdWhileEditingNewPage() {
-               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array());
-               $GLOBALS['SOBE']->elementsData = array(
-                       array(
-                               'table' => 'pages',
-                               'uid' => 'NEW4adc6021e37e7',
-                               'pid' => 121,
-                               'cmd' => 'new',
-                               'deleteAccess' => 0
-                       )
-               );
-               $GLOBALS['SOBE']->data = array();
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertTrue($this->matchCondition->match('[treeLevel = 3]'));
-       }
-
-       /**
-        * Tests whether treeLevel comparison matches when creating new pages.
-        *
-        * @test
-        */
-       public function treeLevelConditionMatchesCurrentPageIdWhileSavingNewPage() {
-               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array());
-               $GLOBALS['SOBE']->elementsData = array(
-                       array(
-                               'table' => 'pages',
-                               /// 999 is the uid of the page that was just created
-                               'uid' => 999,
-                               'pid' => 121,
-                               'cmd' => 'edit',
-                               'deleteAccess' => 1
-                       )
-               );
-               $GLOBALS['SOBE']->data = array(
-                       'pages' => array(
-                               'NEW4adc6021e37e7' => array(
-                                       'pid' => 121
-                               )
-                       )
-               );
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertTrue($this->matchCondition->match('[treeLevel = 3]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionMatchesSinglePageIdInRootline() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 111]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionMatchesMultiplePageIdsInRootline() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 999,111,101]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionDoesNotMatchPageIdNotInRootline() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertFalse($this->matchCondition->match('[PIDupinRootline = 999]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionDoesNotMatchLastPageIdInRootline() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertFalse($this->matchCondition->match('[PIDupinRootline = 121]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionMatchesCurrentPageIdWhileEditingNewPage() {
-               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array());
-               $GLOBALS['SOBE']->elementsData = array(
-                       array(
-                               'table' => 'pages',
-                               'uid' => 'NEW4adc6021e37e7',
-                               'pid' => 121,
-                               'cmd' => 'new',
-                               'deleteAccess' => 0
-                       )
-               );
-               $GLOBALS['SOBE']->data = array();
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 121]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionMatchesCurrentPageIdWhileSavingNewPage() {
-               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array());
-               $GLOBALS['SOBE']->elementsData = array(
-                       array(
-                               'table' => 'pages',
-                               /// 999 is the uid of the page that was just created
-                               'uid' => 999,
-                               'pid' => 121,
-                               'cmd' => 'edit',
-                               'deleteAccess' => 1
-                       )
-               );
-               $GLOBALS['SOBE']->data = array(
-                       'pages' => array(
-                               'NEW4adc6021e37e7' => array(
-                                       'pid' => 121
-                               )
-                       )
-               );
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 121]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in all rootline entries.
-        *
-        * @test
-        */
-       public function PIDinRootlineConditionMatchesSinglePageIdInRootline() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertTrue($this->matchCondition->match('[PIDinRootline = 111]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in all rootline entries.
-        *
-        * @test
-        */
-       public function PIDinRootlineConditionMatchesMultiplePageIdsInRootline() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertTrue($this->matchCondition->match('[PIDinRootline = 999,111,101]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in all rootline entries.
-        *
-        * @test
-        */
-       public function PIDinRootlineConditionMatchesLastPageIdInRootline() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertTrue($this->matchCondition->match('[PIDinRootline = 121]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in all rootline entries.
-        *
-        * @test
-        */
-       public function PIDinRootlineConditionDoesNotMatchPageIdNotInRootline() {
-               $this->matchCondition->setRootline($this->rootline);
-               $this->matchCondition->setPageId(121);
-               $this->assertFalse($this->matchCondition->match('[PIDinRootline = 999]'));
-       }
-
-       /**
-        * Tests whether the compatibility version can be evaluated.
-        * (e.g. 4.9 is compatible to 4.0 but not to 5.0)
-        *
-        * @test
-        */
-       public function compatVersionConditionMatchesOlderRelease() {
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] = '4.9';
-               $this->assertTrue($this->matchCondition->match('[compatVersion = 4.0]'));
-       }
-
-       /**
-        * Tests whether the compatibility version can be evaluated.
-        * (e.g. 4.9 is compatible to 4.0 but not to 5.0)
-        *
-        * @test
-        */
-       public function compatVersionConditionMatchesSameRelease() {
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] = '4.9';
-               $this->assertTrue($this->matchCondition->match('[compatVersion = 4.9]'));
-       }
-
-       /**
-        * Tests whether the compatibility version can be evaluated.
-        * (e.g. 4.9 is compatible to 4.0 but not to 5.0)
-        *
-        * @test
-        */
-       public function compatVersionConditionDoesNotMatchNewerRelease() {
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] = '4.9';
-               $this->assertFalse($this->matchCondition->match('[compatVersion = 5.0]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables works with the namespace 'GP'.
-        *
-        * @test
-        */
-       public function genericGetVariablesSucceedsWithNamespaceGP() {
-               $_GET = array('testGet' => 'getTest');
-               $_POST = array('testPost' => 'postTest');
-               $this->assertTrue($this->matchCondition->match('[globalString = GP:testGet = getTest]'));
-               $this->assertTrue($this->matchCondition->match('[globalString = GP:testPost = postTest]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables does not work with the namespace 'TSFE',
-        * since we are in the backend context here.
-        *
-        * @test
-        */
-       public function genericGetVariablesFailsWithNamespaceTSFE() {
-               $GLOBALS['TSFE'] = new stdClass();
-               $GLOBALS['TSFE']->id = 1234567;
-               $this->assertFalse($this->matchCondition->match('[globalString = TSFE:id = 1234567]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables works with the namespace 'ENV'.
-        *
-        * @test
-        */
-       public function genericGetVariablesSucceedsWithNamespaceENV() {
-               $testKey = uniqid('test');
-               putenv($testKey . '=testValue');
-               $this->assertTrue($this->matchCondition->match(('[globalString = ENV:' . $testKey) . ' = testValue]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables works with the namespace 'IENV'.
-        *
-        * @test
-        */
-       public function genericGetVariablesSucceedsWithNamespaceIENV() {
-               $_SERVER['HTTP_HOST'] = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY') . ':1234567';
-               $this->assertTrue($this->matchCondition->match('[globalString = IENV:TYPO3_PORT = 1234567]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables works with any global namespace.
-        *
-        * @test
-        */
-       public function genericGetVariablesSucceedsWithAnyGlobalNamespace() {
-               $GLOBALS[$this->testGlobalNamespace] = array(
-                       'first' => 'testFirst',
-                       'second' => array('third' => 'testThird')
-               );
-               $this->assertTrue($this->matchCondition->match(('[globalString = ' . $this->testGlobalNamespace) . '|first = testFirst]'));
-               $this->assertTrue($this->matchCondition->match(('[globalString = ' . $this->testGlobalNamespace) . '|second|third = testThird]'));
-       }
-
-       /**
-        * Tests whether determining a pageId works.
-        *
-        * @test
-        */
-       public function pageIdCanBeDeterminedWhileCallingModuleWithPageTree() {
-               $_GET['id'] = 999;
-               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
-               $this->assertEquals(999, $this->matchCondition->getPageId());
-       }
-
-       /**
-        * Tests whether determining a pageId works.
-        *
-        * @test
-        */
-       public function pageIdCanBeDeterminedWhileEditingAPageRecord() {
-               $_GET['edit']['pages'][999] = 'edit';
-               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
-               $this->assertEquals(999, $this->matchCondition->getPageId());
-       }
-
-       /**
-        * Tests whether determining a pageId works.
-        *
-        * @test
-        */
-       public function pageIdCanBeDeterminedWhileEditingARegularRecord() {
-               $this->setUpDatabaseMockForDeterminePageId();
-               $_GET['edit'][$this->testTableName][13] = 'edit';
-               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
-               $this->assertEquals(999, $this->matchCondition->getPageId());
-       }
-
-       /**
-        * Tests whether determining a pageId works.
-        *
-        * @test
-        */
-       public function pageIdCanBeDeterminedWhileCreatingARecord() {
-               $_GET['edit']['pages'][999] = 'new';
-               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
-               $this->assertEquals(999, $this->matchCondition->getPageId());
-       }
-
-       /**
-        * Tests whether determining a pageId works.
-        *
-        * @test
-        */
-       public function pageIdCanBeDeterminedWhileCreatingARecordAfterAnExistingRecord() {
-               $this->setUpDatabaseMockForDeterminePageId();
-               $_GET['edit'][$this->testTableName][-13] = 'new';
-               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
-               $this->assertEquals(999, $this->matchCondition->getPageId());
-       }
-
-       /**
-        * Tests whether determining a pageId works.
-        *
-        * @test
-        */
-       public function pageIdCanBeDeterminedWhileDeletingAPageRecord() {
-               $_GET['cmd']['pages'][999]['delete'] = 1;
-               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
-               $this->assertEquals(999, $this->matchCondition->getPageId());
-       }
-
-       /**
-        * Tests whether determining a pageId works.
-        *
-        * @test
-        */
-       public function pageIdCanBeDeterminedWhileCopyingARecordToAnotherPage() {
-               $_GET['cmd']['pages'][121]['copy'] = 999;
-               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
-               $this->assertEquals(999, $this->matchCondition->getPageId());
-       }
-
-       /**
-        * Tests whether determining a pageId works.
-        *
-        * @test
-        */
-       public function pageIdCanBeDeterminedWhileCopyingARecordAfterAnExistingRecord() {
-               $this->setUpDatabaseMockForDeterminePageId();
-               $_GET['cmd'][$this->testTableName][121]['copy'] = -13;
-               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
-               $this->assertEquals(999, $this->matchCondition->getPageId());
-       }
-
-       /**
-        * Tests whether determining a pageId works.
-        *
-        * @test
-        */
-       public function pageIdCanBeDeterminedWhileMovingARecordToAnotherPage() {
-               $_GET['cmd']['pages'][121]['move'] = 999;
-               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
-               $this->assertEquals(999, $this->matchCondition->getPageId());
-       }
-
-       /**
-        * Callback method for pageIdCanBeDetermined test cases.
-        * Simulates TYPO3_DB->exec_SELECTquery().
-        *
-        * @param       string          $fields
-        * @param       string          $table
-        * @param       string          $where
-        * @return      mixed
-        */
-       public function determinePageIdByRecordDatabaseExecuteCallback($fields, $table, $where) {
-               if ($table === $this->testTableName) {
-                       return array(
-                               'scope' => $this->testTableName,
-                               'data' => array(
-                                       'pid' => 999
-                               )
-                       );
-               } else {
-                       return FALSE;
-               }
-       }
-
-       /**
-        * Callback method for pageIdCanBeDetermined test cases.
-        * Simulates TYPO3_DB->sql_fetch_assoc().
-        *
-        * @param       mixed           $resource
-        * @return      mixed
-        */
-       public function determinePageIdByRecordDatabaseFetchCallback($resource) {
-               if (is_array($resource) && $resource['scope'] === $this->testTableName) {
-                       return $resource['data'];
-               } else {
-                       return FALSE;
-               }
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/matchcondition/class.t3lib_matchcondition_frontendTest.php b/tests/Unit/t3lib/matchcondition/class.t3lib_matchcondition_frontendTest.php
deleted file mode 100644 (file)
index a39da18..0000000
+++ /dev/null
@@ -1,724 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2009-2011 Oliver Hader <oliver@typo3.org>
- *  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!
- ***************************************************************/
-/**
- * Testcase for class t3lib_matchCondition_frontend.
- *
- * @author     Oliver Hader <oliver@typo3.org>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_matchCondition_frontendTest extends tx_phpunit_testcase {
-
-       /**
-        * @var         array
-        */
-       private $backupGlobalVariables;
-
-       /**
-        * @var         array
-        */
-       private $rootline;
-
-       /**
-        * @var         t3lib_matchCondition
-        */
-       private $matchCondition;
-
-       public function setUp() {
-               $this->backupGlobalVariables = array(
-                       '_ENV' => $_ENV,
-                       '_GET' => $_GET,
-                       '_POST' => $_POST,
-                       '_SERVER' => $_SERVER,
-                       'TYPO3_CONF_VARS' => $GLOBALS['TYPO3_CONF_VARS'],
-                       'T3_VAR' => $GLOBALS['T3_VAR']
-               );
-               $this->testGlobalNamespace = uniqid('TEST');
-               $GLOBALS[$this->testGlobalNamespace] = array();
-               $this->setUpTSFE();
-               $this->matchCondition = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Frontend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher');
-       }
-
-       public function tearDown() {
-               foreach ($this->backupGlobalVariables as $key => $data) {
-                       $GLOBALS[$key] = $data;
-               }
-               unset($this->matchCondition);
-               unset($this->backupGlobalVariables);
-               unset($GLOBALS[$this->testGlobalNamespace]);
-       }
-
-       private function setUpTSFE() {
-               $this->rootline = array(
-                       2 => array('uid' => 121, 'pid' => 111),
-                       1 => array('uid' => 111, 'pid' => 101),
-                       0 => array('uid' => 101, 'pid' => 0)
-               );
-       }
-
-       /**
-        * Tests whether a faulty expression fails.
-        *
-        * @test
-        */
-       public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {
-               $this->matchCondition->matchAll = FALSE;
-               $this->assertFalse($this->matchCondition->match('[nullCondition = This expression would return FALSE in general]'));
-       }
-
-       /**
-        * Tests whether simulating positive matches for all conditions succeeds.
-        *
-        * @test
-        */
-       public function simulateEnabledMatchAllConditionsSucceeds() {
-               $this->matchCondition->setSimulateMatchResult(TRUE);
-               $this->assertTrue($this->matchCondition->match('[nullCondition = This expression would return FALSE in general]'));
-       }
-
-       /**
-        * Tests whether simulating positive matches for specific conditions succeeds.
-        *
-        * @test
-        */
-       public function simulateEnabledMatchSpecificConditionsSucceeds() {
-               $testCondition = ('[' . uniqid('test')) . ' = Any condition to simulate a positive match]';
-               $this->matchCondition->setSimulateMatchConditions(array($testCondition));
-               $this->assertTrue($this->matchCondition->match($testCondition));
-       }
-
-       /**
-        * Tests whether a condition matches Internet Explorer 7 on Windows.
-        *
-        * @return      void
-        * @test
-        */
-       public function conditionMatchesInternetExplorer7Windows() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)';
-               $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does not match Internet Explorer 7 on Windows.
-        *
-        * @return      void
-        * @test
-        */
-       public function conditionDoesNotMatchInternetExplorer7Windows() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Opera/9.25 (Windows NT 6.0; U; en)';
-               $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]');
-               $this->assertFalse($result);
-       }
-
-       /**
-        * Tests whether a condition does match the iOS with the correct and more recent 'iOS'
-        *
-        * @test
-        */
-       public function conditionDoesMatchIosWithCorrectSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10';
-               $result = $this->matchCondition->match('[system = iOS]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match the iOS with the old 'mac'
-        *
-        * @test
-        */
-       public function conditionDoesMatchIosWithOldSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10';
-               $result = $this->matchCondition->match('[system = mac]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Windows 2000 with the correct and more recent 'win2k'
-        *
-        * @test
-        */
-       public function conditionDoesMatchWindows2kWithNewSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)';
-               $result = $this->matchCondition->match('[system = win2k]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Windows 2000 with the old 'winNT'
-        *
-        * @test
-        */
-       public function conditionDoesMatchWindows2kWithOldSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)';
-               $result = $this->matchCondition->match('[system = winNT]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Windows NT with 'winNT'
-        *
-        * @test
-        */
-       public function conditionDoesMatchWindowsNtWithSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)';
-               $result = $this->matchCondition->match('[system = winNT]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Android with the correct and more recent 'android'
-        *
-        * @test
-        */
-       public function conditionDoesMatchAndroidWithNewSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
-               $result = $this->matchCondition->match('[system = android]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a condition does match Android with the old 'linux'
-        *
-        * @test
-        */
-       public function conditionDoesMatchAndroidWithOldSystemKey() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
-               $result = $this->matchCondition->match('[system = linux]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a device type condition matches a crawler.
-        *
-        * @test
-        */
-       public function deviceConditionMatchesRobot() {
-               $_SERVER['HTTP_USER_AGENT'] = 'Googlebot/2.1 (+http://www.google.com/bot.html)';
-               $result = $this->matchCondition->match('[device = robot]');
-               $this->assertTrue($result);
-       }
-
-       /**
-        * Tests whether a device type condition does not match a crawler.
-        *
-        * @test
-        */
-       public function deviceConditionDoesNotMatchRobot() {
-               $_SERVER['HTTP_USER_AGENT'] = md5('Some strange user agent');
-               $result = $this->matchCondition->match('[device = robot]');
-               $this->assertFalse($result);
-       }
-
-       /**
-        * Tests whether the language comparison matches.
-        *
-        * @test
-        */
-       public function languageConditionMatchesSingleLanguageExpression() {
-               $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
-               $this->assertTrue($this->matchCondition->match('[language = *de*]'));
-               $this->assertTrue($this->matchCondition->match('[language = *de-de*]'));
-       }
-
-       /**
-        * Tests whether the language comparison matches.
-        *
-        * @test
-        */
-       public function languageConditionMatchesMultipleLanguagesExpression() {
-               $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
-               $this->assertTrue($this->matchCondition->match('[language = *en*,*de*]'));
-               $this->assertTrue($this->matchCondition->match('[language = *en-us*,*de-de*]'));
-       }
-
-       /**
-        * Tests whether the language comparison matches.
-        *
-        * @test
-        */
-       public function languageConditionMatchesCompleteLanguagesExpression() {
-               $this->markTestSkipped('This comparison seems to be incomplete in t3lib_matchCondition.');
-               $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
-               $this->assertTrue($this->matchCondition->match('[language = de-de,de;q=0.8]'));
-       }
-
-       /**
-        * Tests whether usergroup comparison matches.
-        *
-        * @test
-        */
-       public function usergroupConditionMatchesSingleGroupId() {
-               $GLOBALS['TSFE']->gr_list = '13,14,15';
-               $this->assertTrue($this->matchCondition->match('[usergroup = 13]'));
-       }
-
-       /**
-        * Tests whether usergroup comparison matches.
-        *
-        * @test
-        */
-       public function usergroupConditionMatchesMultipleUserGroupId() {
-               $GLOBALS['TSFE']->gr_list = '13,14,15';
-               $this->assertTrue($this->matchCondition->match('[usergroup = 999,15,14,13]'));
-       }
-
-       /**
-        * Tests whether usergroup comparison matches.
-        *
-        * @test
-        */
-       public function usergroupConditionDoesNotMatchDefaulUserGroupIds() {
-               $GLOBALS['TSFE']->gr_list = '0,-1';
-               $this->assertFalse($this->matchCondition->match('[usergroup = 0,-1]'));
-       }
-
-       /**
-        * Tests whether user comparison matches.
-        *
-        * @test
-        */
-       public function loginUserConditionMatchesAnyLoggedInUser() {
-               $GLOBALS['TSFE']->loginUser = TRUE;
-               $GLOBALS['TSFE']->fe_user->user['uid'] = 13;
-               $this->assertTrue($this->matchCondition->match('[loginUser = *]'));
-       }
-
-       /**
-        * Tests whether user comparison matches.
-        *
-        * @test
-        */
-       public function loginUserConditionMatchesSingleLoggedInUser() {
-               $GLOBALS['TSFE']->loginUser = TRUE;
-               $GLOBALS['TSFE']->fe_user->user['uid'] = 13;
-               $this->assertTrue($this->matchCondition->match('[loginUser = 13]'));
-       }
-
-       /**
-        * Tests whether user comparison matches.
-        *
-        * @test
-        */
-       public function loginUserConditionMatchesMultipleLoggedInUsers() {
-               $GLOBALS['TSFE']->loginUser = TRUE;
-               $GLOBALS['TSFE']->fe_user->user['uid'] = 13;
-               $this->assertTrue($this->matchCondition->match('[loginUser = 999,13]'));
-       }
-
-       /**
-        * Tests whether user comparison matches.
-        *
-        * @test
-        */
-       public function loginUserConditionDoesNotMatchIfNotUserIsLoggedId() {
-               $GLOBALS['TSFE']->loginUser = FALSE;
-               $GLOBALS['TSFE']->fe_user->user['uid'] = 13;
-               $this->assertFalse($this->matchCondition->match('[loginUser = *]'));
-               $this->assertFalse($this->matchCondition->match('[loginUser = 13]'));
-       }
-
-       /**
-        * Tests whether user is not logged in
-        *
-        * @test
-        */
-       public function loginUserConditionMatchIfUserIsNotLoggedIn() {
-               $GLOBALS['TSFE']->loginUser = FALSE;
-               $this->assertTrue($this->matchCondition->match('[loginUser = ]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 = 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 = 10.1]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 == 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 == 10.1]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnEqualExpressionWithMultipleValues() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 = 10|20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 = 10.1|20.2|30.3]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 = 10|20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20.2 = 10.1|20.2|30.3]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 == 10|20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 == 10.1|20.2|30.3]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 == 10|20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20.2 == 10.1|20.2|30.3]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnNotEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 != 20]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 != 10.2]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnNotEqualExpressionWithMultipleValues() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 != 20|30]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 != 10.2|20.3]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnLowerThanExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 < 20]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 < 10.2]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnLowerThanOrEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 <= 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 <= 20]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 <= 10.1]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 <= 10.2]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnGreaterThanExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 > 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.2 > 10.1]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnGreaterThanOrEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 >= 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 >= 10]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 >= 10.1]'));
-               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.2 >= 10.1]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionMatchesOnEmptyExpressionWithNoValueSet() {
-               $testKey = uniqid('test');
-               $this->assertTrue($this->matchCondition->match(('[globalVar = GP:' . $testKey) . '=]'));
-               $this->assertTrue($this->matchCondition->match(('[globalVar = GP:' . $testKey) . ' = ]'));
-       }
-
-       /**
-        * Tests whether numerical comparison matches.
-        *
-        * @test
-        */
-       public function globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero() {
-               $testKey = uniqid('test');
-               $_GET = array();
-               $_POST = array($testKey => 0);
-               $this->assertFalse($this->matchCondition->match(('[globalVar = GP:' . $testKey) . '=]'));
-               $this->assertFalse($this->matchCondition->match(('[globalVar = GP:' . $testKey) . ' = ]'));
-       }
-
-       /**
-        * Tests whether string comparison matches.
-        *
-        * @test
-        */
-       public function globalStringConditionMatchesOnEqualExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3.Test.Condition]'));
-               $this->assertFalse($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3]'));
-       }
-
-       /**
-        * Tests whether string comparison matches.
-        *
-        * @test
-        */
-       public function globalStringConditionMatchesWildcardExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3?Test?Condition]'));
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3.T*t.Condition]'));
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3?T*t?Condition]'));
-       }
-
-       /**
-        * Tests whether string comparison matches.
-        *
-        * @test
-        */
-       public function globalStringConditionMatchesRegularExpression() {
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = /^[A-Za-z3.]+$/]'));
-               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = /^TYPO3\\..+Condition$/]'));
-               $this->assertFalse($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = /^FALSE/]'));
-       }
-
-       /**
-        * Tests whether string comparison matches.
-        *
-        * @test
-        */
-       public function globalStringConditionMatchesEmptyRegularExpression() {
-               $testKey = uniqid('test');
-               $_SERVER[$testKey] = '';
-               $this->assertTrue($this->matchCondition->match(('[globalString = _SERVER|' . $testKey) . ' = /^$/]'));
-       }
-
-       /**
-        * Tests whether treeLevel comparison matches.
-        *
-        * @test
-        */
-       public function treeLevelConditionMatchesSingleValue() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $this->assertTrue($this->matchCondition->match('[treeLevel = 2]'));
-       }
-
-       /**
-        * Tests whether treeLevel comparison matches.
-        *
-        * @test
-        */
-       public function treeLevelConditionMatchesMultipleValues() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $this->assertTrue($this->matchCondition->match('[treeLevel = 999,998,2]'));
-       }
-
-       /**
-        * Tests whether treeLevel comparison matches.
-        *
-        * @test
-        */
-       public function treeLevelConditionDoesNotMatchFaultyValue() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $this->assertFalse($this->matchCondition->match('[treeLevel = 999]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionMatchesSinglePageIdInRootline() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $GLOBALS['TSFE']->id = 121;
-               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 111]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionMatchesMultiplePageIdsInRootline() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $GLOBALS['TSFE']->id = 121;
-               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 999,111,101]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionDoesNotMatchPageIdNotInRootline() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $GLOBALS['TSFE']->id = 121;
-               $this->assertFalse($this->matchCondition->match('[PIDupinRootline = 999]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in the previous rootline entries.
-        *
-        * @test
-        */
-       public function PIDupinRootlineConditionDoesNotMatchLastPageIdInRootline() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $GLOBALS['TSFE']->id = 121;
-               $this->assertFalse($this->matchCondition->match('[PIDupinRootline = 121]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in all rootline entries.
-        *
-        * @test
-        */
-       public function PIDinRootlineConditionMatchesSinglePageIdInRootline() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $GLOBALS['TSFE']->id = 121;
-               $this->assertTrue($this->matchCondition->match('[PIDinRootline = 111]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in all rootline entries.
-        *
-        * @test
-        */
-       public function PIDinRootlineConditionMatchesMultiplePageIdsInRootline() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $GLOBALS['TSFE']->id = 121;
-               $this->assertTrue($this->matchCondition->match('[PIDinRootline = 999,111,101]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in all rootline entries.
-        *
-        * @test
-        */
-       public function PIDinRootlineConditionMatchesLastPageIdInRootline() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $GLOBALS['TSFE']->id = 121;
-               $this->assertTrue($this->matchCondition->match('[PIDinRootline = 121]'));
-       }
-
-       /**
-        * Tests whether a page Id is found in all rootline entries.
-        *
-        * @test
-        */
-       public function PIDinRootlineConditionDoesNotMatchPageIdNotInRootline() {
-               $GLOBALS['TSFE']->tmpl->rootLine = $this->rootline;
-               $GLOBALS['TSFE']->id = 121;
-               $this->assertFalse($this->matchCondition->match('[PIDinRootline = 999]'));
-       }
-
-       /**
-        * Tests whether the compatibility version can be evaluated.
-        * (e.g. 4.9 is compatible to 4.0 but not to 5.0)
-        *
-        * @test
-        */
-       public function compatVersionConditionMatchesOlderRelease() {
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] = '4.9';
-               $this->assertTrue($this->matchCondition->match('[compatVersion = 4.0]'));
-       }
-
-       /**
-        * Tests whether the compatibility version can be evaluated.
-        * (e.g. 4.9 is compatible to 4.0 but not to 5.0)
-        *
-        * @test
-        */
-       public function compatVersionConditionMatchesSameRelease() {
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] = '4.9';
-               $this->assertTrue($this->matchCondition->match('[compatVersion = 4.9]'));
-       }
-
-       /**
-        * Tests whether the compatibility version can be evaluated.
-        * (e.g. 4.9 is compatible to 4.0 but not to 5.0)
-        *
-        * @test
-        */
-       public function compatVersionConditionDoesNotMatchNewerRelease() {
-               $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] = '4.9';
-               $this->assertFalse($this->matchCondition->match('[compatVersion = 5.0]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables works with the namespace 'GP'.
-        *
-        * @test
-        */
-       public function genericGetVariablesSucceedsWithNamespaceGP() {
-               $_GET = array('testGet' => 'getTest');
-               $_POST = array('testPost' => 'postTest');
-               $this->assertTrue($this->matchCondition->match('[globalString = GP:testGet = getTest]'));
-               $this->assertTrue($this->matchCondition->match('[globalString = GP:testPost = postTest]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables works with the namespace 'TSFE'.
-        *
-        * @test
-        */
-       public function genericGetVariablesSucceedsWithNamespaceTSFE() {
-               $GLOBALS['TSFE']->id = 1234567;
-               $GLOBALS['TSFE']->testSimpleObject = new stdClass();
-               $GLOBALS['TSFE']->testSimpleObject->testSimpleVariable = 'testValue';
-               $this->assertTrue($this->matchCondition->match('[globalString = TSFE:id = 1234567]'));
-               $this->assertTrue($this->matchCondition->match('[globalString = TSFE:testSimpleObject|testSimpleVariable = testValue]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables works with the namespace 'ENV'.
-        *
-        * @test
-        */
-       public function genericGetVariablesSucceedsWithNamespaceENV() {
-               $testKey = uniqid('test');
-               putenv($testKey . '=testValue');
-               $this->assertTrue($this->matchCondition->match(('[globalString = ENV:' . $testKey) . ' = testValue]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables works with the namespace 'IENV'.
-        *
-        * @test
-        */
-       public function genericGetVariablesSucceedsWithNamespaceIENV() {
-               $_SERVER['HTTP_HOST'] = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY') . ':1234567';
-               $this->assertTrue($this->matchCondition->match('[globalString = IENV:TYPO3_PORT = 1234567]'));
-       }
-
-       /**
-        * Tests whether the generic fetching of variables works with any global namespace.
-        *
-        * @test
-        */
-       public function genericGetVariablesSucceedsWithAnyGlobalNamespace() {
-               $GLOBALS[$this->testGlobalNamespace] = array(
-                       'first' => 'testFirst',
-                       'second' => array('third' => 'testThird')
-               );
-               $this->assertTrue($this->matchCondition->match(('[globalString = ' . $this->testGlobalNamespace) . '|first = testFirst]'));
-               $this->assertTrue($this->matchCondition->match(('[globalString = ' . $this->testGlobalNamespace) . '|second|third = testThird]'));
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/tree/class.t3lib_tree_nodeTest.php b/tests/Unit/t3lib/tree/class.t3lib_tree_nodeTest.php
deleted file mode 100644 (file)
index 8bf9b99..0000000
+++ /dev/null
@@ -1,113 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010-2011 Stefan Galinski <stefan.galinski@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!
- ***************************************************************/
-/**
- * Testcase for class t3lib_tree_Node.
- *
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_tree_NodeTest extends tx_phpunit_testcase {
-
-       //////////////////////
-       // Utility functions
-       //////////////////////
-       /**
-        * Returns the absolute fixtures path for this testcase.
-        *
-        * @return string the absolute fixtures path for this testcase, will not be empty
-        */
-       private function determineFixturesPath() {
-               return \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('Tx_Phpunit_Service_TestFinder')->getAbsoluteCoreTestsPath() . 'Unit/t3lib/tree/fixtures/';
-       }
-
-       protected function setUpNodeTestData() {
-               $fixture = new \TYPO3\CMS\Backend\Tree\TreeNode();
-               $fixture->setId('Root');
-               $nodeCollection = new \TYPO3\CMS\Backend\Tree\TreeNodeCollection();
-               for ($i = 0; $i < 10; ++$i) {
-                       $node = new \TYPO3\CMS\Backend\Tree\TreeNode();
-                       $node->setId($i);
-                       $node->setParentNode($fixture);
-                       $subNodeCollection = new \TYPO3\CMS\Backend\Tree\TreeNodeCollection();
-                       for ($j = 0; $j < 5; ++$j) {
-                               $subNode = new \TYPO3\CMS\Backend\Tree\TreeRepresentationNode();
-                               $subNode->setId($j);
-                               $subNode->setLabel('SubTest');
-                               $subNode->setType('Type');
-                               $subNode->setClass('Class');
-                               $subNode->setIcon('Icon');
-                               $subNode->setCallbackAction('Callback Action');
-                               $subNode->setParentNode($node);
-                               $subNodeCollection->append($subNode);
-                       }
-                       $node->setChildNodes($subNodeCollection);
-                       $nodeCollection->append($node);
-               }
-               $fixture->setChildNodes($nodeCollection);
-               return $fixture;
-       }
-
-       ///////////////
-       // Test cases
-       ///////////////
-       /**
-        * @test
-        */
-       public function serializeFixture() {
-               $expected = trim(file_get_contents($this->determineFixturesPath() . 'serialized.txt'));
-               $fixture = $this->setUpNodeTestData();
-               $serializedString = trim($fixture->serialize());
-               $this->assertSame($expected, $serializedString);
-       }
-
-       /**
-        * @test
-        */
-       public function deserializeFixture() {
-               $source = trim(file_get_contents($this->determineFixturesPath() . 'serialized.txt'));
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode();
-               $node->unserialize($source);
-               $serializedString = $node->serialize();
-               $this->assertSame($source, $serializedString);
-       }
-
-       /**
-        * @test
-        */
-       public function compareNodes() {
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => '15'));
-               $otherNode = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => '5'));
-               $compareResult = $node->compareTo($otherNode);
-               $otherNode->setId('25');
-               $compareResult = $node->compareTo($otherNode);
-               $this->assertSame(-1, $compareResult);
-               $otherNode->setId('15');
-               $compareResult = $node->compareTo($otherNode);
-               $this->assertSame(0, $compareResult);
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/tree/class.t3lib_tree_nodecollectionTest.php b/tests/Unit/t3lib/tree/class.t3lib_tree_nodecollectionTest.php
deleted file mode 100644 (file)
index 3682a66..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010-2011 Stefan Galinski <stefan.galinski@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!
- ***************************************************************/
-/**
- * Testcase for class t3lib_tree_NodeCollection.
- *
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_tree_NodeCollectionTest extends tx_phpunit_testcase {
-
-       public function setUp() {
-
-       }
-
-       public function tearDown() {
-
-       }
-
-       /**
-        * @test
-        */
-       public function sortNodes() {
-               $nodeCollection = new \TYPO3\CMS\Backend\Tree\TreeNodeCollection(array(
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 15),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 25),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 5),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 2),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 150),
-                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 67)
-               ));
-               $nodeCollection->asort();
-               $expected = array(2, 5, 15, 25, 67, 150);
-               $ids = array();
-               foreach ($nodeCollection as $node) {
-                       $ids[] = $node->getId();
-               }
-               $this->assertSame($expected, $ids);
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/tree/class.t3lib_tree_sortednodecollectionTest.php b/tests/Unit/t3lib/tree/class.t3lib_tree_sortednodecollectionTest.php
deleted file mode 100644 (file)
index 488ead8..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2010-2011 Stefan Galinski <stefan.galinski@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!
- ***************************************************************/
-/**
- * Testcase for class t3lib_tree_SortedNodeCollection.
- *
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_tree_SortedNodeCollectionTest extends tx_phpunit_testcase {
-
-       protected function createTestCollection() {
-               $nodeCollection = new \TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection();
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 5));
-               $nodeCollection->append($node);
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 15));
-               $nodeCollection->append($node);
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 3));
-               $nodeCollection->append($node);
-               return $nodeCollection;
-       }
-
-       protected function createTestCollectionWithTwoNodes() {
-               $nodeCollection = new \TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection();
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 5));
-               $nodeCollection->append($node);
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 3));
-               $nodeCollection->append($node);
-               return $nodeCollection;
-       }
-
-       /**
-        * @test
-        */
-       public function appendsSorted() {
-               $nodeCollection = $this->createTestCollection();
-               $expected = array(3, 5, 15);
-               $ids = array();
-               foreach ($nodeCollection as $node) {
-                       $ids[] = $node->getId();
-               }
-               $this->assertSame($expected, $ids);
-       }
-
-       /**
-        * @test
-        */
-       public function collectionContainsNode() {
-               $nodeCollection = $this->createTestCollection();
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 5));
-               $this->assertTrue($nodeCollection->contains($node));
-       }
-
-       /**
-        * @test
-        */
-       public function searchDataWithBinarySearch() {
-               $nodeCollection = $this->createTestCollection();
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 15));
-               $this->assertTrue($nodeCollection->contains($node));
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 99));
-               $this->assertFalse($nodeCollection->contains($node));
-               $nodeCollection = $this->createTestCollectionWithTwoNodes();
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 3));
-               $this->assertTrue($nodeCollection->contains($node));
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 99));
-               $this->assertFalse($nodeCollection->contains($node));
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/tree/fixtures/serialized.txt b/tests/Unit/t3lib/tree/fixtures/serialized.txt
deleted file mode 100644 (file)
index f1ab8d7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";a:11:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:1;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:2;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:3;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:4;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:5;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:6;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:7;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:8;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:9;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}}}
diff --git a/tests/Unit/t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataproviderTest.php b/tests/Unit/t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataproviderTest.php
deleted file mode 100644 (file)
index 9fd78b7..0000000
+++ /dev/null
@@ -1,124 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2012 Stefan Galinski <stefan.galinski@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!
- ***************************************************************/
-/**
- * Testcase for class t3lib_tree_pagetree_DataProvider.
- *
- * @author Stefan Galinski <stefan.galinski@gmail.com>
- * @author Oliver Klee <typo3-coding@oliverklee.de>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_tree_pagetree_DataProviderTest extends tx_phpunit_testcase {
-
-       /**
-        * @var boolean
-        */
-       protected $backupGlobals = TRUE;
-
-       /**
-        * Excludes TYPO3_DB from backup/restore of $GLOBALS because resource types cannot be handled during serializing.
-        *
-        * @var array
-        */
-       protected $backupGlobalsBlacklist = array('TYPO3_DB');
-
-       /**
-        * @var t3lib_tree_pagetree_DataProvider|PHPUnit_Framework_MockObject_MockObject
-        */
-       protected $fixture = NULL;
-
-       public function setUp() {
-               $GLOBALS['TYPO3_CONF_VARS']['BE']['pageTree']['preloadLimit'] = 0;
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'] = array();
-               $this->fixture = new \TYPO3\CMS\Backend\Tree\Pagetree\DataProvider();
-       }
-
-       public function tearDown() {
-               unset($this->fixture);
-       }
-
-       /**
-        * @test
-        */
-       public function getRootNodeReturnsNodeWithRootId() {
-               $this->assertSame('root', $this->fixture->getRoot()->getId());
-       }
-
-       /**
-        * @test
-        */
-       public function getRootNodeReturnsExpandedNode() {
-               $this->assertTrue($this->fixture->getRoot()->isExpanded());
-       }
-
-       /**
-        * @test
-        */
-       public function getNodesSetsIsMountPointField() {
-               $subpages = array(
-                       array(
-                               'uid' => 1,
-                               'isMountPoint' => FALSE
-                       ),
-                       array(
-                               'uid' => 2,
-                               'isMountPoint' => TRUE
-                       ),
-                       array(
-                               'uid' => 3
-                       )
-               );
-               $subpagesWithWorkspaceOverlay = array(
-                       array(
-                               'uid' => 1,
-                               'title' => 'Home'
-                       ),
-                       array(
-                               'uid' => 2,
-                               'title' => 'service'
-                       ),
-                       array(
-                               'uid' => 3,
-                               'title' => 'contact'
-                       )
-               );
-               $fixture = $this->getMock('TYPO3\\CMS\\Backend\\Tree\\Pagetree\\DataProvider', array('getSubpages', 'getRecordWithWorkspaceOverlay'));
-               $fixture->expects($this->once())->method('getSubpages')->will($this->returnValue($subpages));
-               $fixture->expects($this->at(1))->method('getRecordWithWorkspaceOverlay')->with(1)->will($this->returnValue($subpagesWithWorkspaceOverlay[0]));
-               $fixture->expects($this->at(2))->method('getRecordWithWorkspaceOverlay')->with(2)->will($this->returnValue($subpagesWithWorkspaceOverlay[1]));
-               $fixture->expects($this->at(3))->method('getRecordWithWorkspaceOverlay')->with(3)->will($this->returnValue($subpagesWithWorkspaceOverlay[2]));
-               $node = new \TYPO3\CMS\Backend\Tree\TreeNode();
-               $node->setId(12);
-               $nodeCollection = $fixture->getNodes($node);
-               $isMountPointResult = array();
-               /** @var $node \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
-               foreach ($nodeCollection as $node) {
-                       $isMountPointResult[] = $node->isMountPoint();
-               }
-               $this->assertSame(array(FALSE, TRUE, FALSE), $isMountPointResult);
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/utility/class.t3lib_utility_arrayTest.php b/tests/Unit/t3lib/utility/class.t3lib_utility_arrayTest.php
deleted file mode 100644 (file)
index f8f7d01..0000000
+++ /dev/null
@@ -1,817 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2011 Susanne Moog <typo3@susanne-moog.de>
- *  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!
- ***************************************************************/
-/**
- * Testcase for class t3lib_utility_array
- *
- * @author Susanne Moog <typo3@susanne-moog.de>
- * @author Christian Kuhn <lolli@schwarzbu.ch>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_utility_ArrayTest extends tx_phpunit_testcase {
-
-       ///////////////////////
-       // Tests concerning filterByValueRecursive
-       ///////////////////////
-       /**
-        * Data provider for filterByValueRecursiveCorrectlyFiltersArray
-        *
-        * Every array splits into:
-        * - String value to search for
-        * - Input array
-        * - Expected result array
-        */
-       public function filterByValueRecursive() {
-               return array(
-                       'empty search array' => array(
-                               'banana',
-                               array(),
-                               array()
-                       ),
-                       'empty string as needle' => array(
-                               '',
-                               array(
-                                       '',
-                                       'apple'
-                               ),
-                               array(
-                                       ''
-                               )
-                       ),
-                       'flat array searching for string' => array(
-                               'banana',
-                               array(
-                                       'apple',
-                                       'banana'
-                               ),
-                               array(
-                                       1 => 'banana'
-                               )
-                       ),
-                       'flat array searching for string with two matches' => array(
-                               'banana',
-                               array(
-                                       'foo' => 'apple',
-                                       'firstbanana' => 'banana',
-                                       'secondbanana' => 'banana'
-                               ),
-                               array(
-                                       'firstbanana' => 'banana',
-                                       'secondbanana' => 'banana'
-                               )
-                       ),
-                       'multi dimensional array searching for string with multiple matches' => array(
-                               'banana',
-                               array(
-                                       'foo' => 'apple',
-                                       'firstbanana' => 'banana',
-                                       'grape' => array(
-                                               'foo2' => 'apple2',
-                                               'secondbanana' => 'banana',
-                                               'foo3' => array()
-                                       ),
-                                       'bar' => 'orange'
-                               ),
-                               array(
-                                       'firstbanana' => 'banana',
-                                       'grape' => array(
-                                               'secondbanana' => 'banana'
-                                       )
-                               )
-                       ),
-                       'multi dimensional array searching for integer with multiple matches' => array(
-                               42,
-                               array(
-                                       'foo' => 23,
-                                       'bar' => 42,
-                                       array(
-                                               'foo' => 23,
-                                               'bar' => 42
-                                       )
-                               ),
-                               array(
-                                       'bar' => 42,
-                                       array(
-                                               'bar' => 42
-                                       )
-                               )
-                       ),
-                       'flat array searching for boolean TRUE' => array(
-                               TRUE,
-                               array(
-                                       23 => FALSE,
-                                       42 => TRUE
-                               ),
-                               array(
-                                       42 => TRUE
-                               )
-                       ),
-                       'multi dimensional array searching for boolean FALSE' => array(
-                               FALSE,
-                               array(
-                                       23 => FALSE,
-                                       42 => TRUE,
-                                       'foo' => array(
-                                               23 => FALSE,
-                                               42 => TRUE
-                                       )
-                               ),
-                               array(
-                                       23 => FALSE,
-                                       'foo' => array(
-                                               23 => FALSE
-                                       )
-                               )
-                       ),
-                       'flat array searching for array' => array(
-                               array(
-                                       'foo' => 'bar'
-                               ),
-                               array(
-                                       'foo' => 'bar',
-                                       'foobar' => array(
-                                               'foo' => 'bar'
-                                       )
-                               ),
-                               array(
-                                       'foobar' => array(
-                                               'foo' => 'bar'
-                                       )
-                               )
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider filterByValueRecursive
-        */
-       public function filterByValueRecursiveCorrectlyFiltersArray($needle, $haystack, $expectedResult) {
-               $this->assertEquals($expectedResult, \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive($needle, $haystack));
-       }
-
-       /**
-        * @test
-        */
-       public function filterByValueRecursiveMatchesReferencesToSameObject() {
-               $instance = new stdClass();
-               $this->assertEquals(array($instance), \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive($instance, array($instance)));
-       }
-
-       /**
-        * @test
-        */
-       public function filterByValueRecursiveDoesNotMatchDifferentInstancesOfSameClass() {
-               $this->assertEquals(array(), \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive(new stdClass(), array(new stdClass())));
-       }
-
-       ///////////////////////
-       // Tests concerning isValidPath
-       ///////////////////////
-       /**
-        * Mock the class under test, isValidPath() (method under test), calls
-        * static getValuePath() internally, which is mocked here to return a specific
-        * result. This works because of 'static' keyword'  instead of 'self'
-        * for getValueByPath() call, using late static binding in PHP 5.3
-        *
-        * @test
-        */
-       public function isValidPathReturnsTrueIfPathExists() {
-               $namespace = 'TYPO3\\CMS\\Core\\Utility';
-               $className = uniqid('ArrayUtility');
-               eval(((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Utility\\ArrayUtility {') . '  public static function getValueByPath() {') . '    return 42;') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $this->assertTrue($className::isValidPath(array('foo'), 'foo'));
-       }
-
-       /**
-        * @test
-        */
-       public function isValidPathReturnsFalseIfPathDoesNotExist() {
-               $namespace = 'TYPO3\\CMS\\Core\\Utility';
-               $className = uniqid('ArrayUtility');
-               eval(((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Utility\\ArrayUtility {') . '  public static function getValueByPath() {') . '    throw new \RuntimeException(\'foo\', 123);') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $this->assertFalse($className::isValidPath(array('foo'), 'foo'));
-       }
-
-       ///////////////////////
-       // Tests concerning getValueByPath
-       ///////////////////////
-       /**
-        * @test
-        * @expectedException RuntimeException
-        */
-       public function getValueByPathThrowsExceptionIfPathIsEmpty() {
-               \TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath(array(), '');
-       }
-
-       /**
-        * Data provider for getValueByPathThrowsExceptionIfPathNotExists
-        * Every array splits into:
-        * - Array to get value from
-        * - String path
-        * - Expected result
-        */
-       public function getValueByPathInvalidPathDataProvider() {
-               return array(
-                       'not existing path 1' => array(
-                               array(
-                                       'foo' => array()
-                               ),
-                               'foo/bar/baz',
-                               FALSE
-                       ),
-                       'not existing path 2' => array(
-                               array(
-                                       'foo' => array(
-                                               'baz' => 42
-                                       ),
-                                       'bar' => array()
-                               ),
-                               'foo/bar/baz',
-                               FALSE
-                       ),
-                       // Negative test: This could be improved and the test moved to
-                       // the valid data provider if the method supports this
-                       'doubletick encapsulated quoted doubletick does not work' => array(
-                               array(
-                                       '"foo"bar"' => array(
-                                               'baz' => 42
-                                       ),
-                                       'bar' => array()
-                               ),
-                               '"foo\\"bar"/baz',
-                               42
-                       ),
-                       // Negative test: Method could be improved here
-                       'path with doubletick does not work' => array(
-                               array(
-                                       'fo"o' => array(
-                                               'bar' => 42
-                                       )
-                               ),
-                               'fo"o/foobar',
-                               42
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider getValueByPathInvalidPathDataProvider
-        * @expectedException RuntimeException
-        */
-       public function getValueByPathThrowsExceptionIfPathNotExists(array $array, $path) {
-               \TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath($array, $path);
-       }
-
-       /**
-        * Data provider for getValueByPathReturnsCorrectValue
-        * Every array splits into:
-        * - Array to get value from
-        * - String path
-        * - Expected result
-        */
-       public function getValueByPathValidDataProvider() {
-               $testObject = new StdClass();
-               $testObject->foo = 'foo';
-               $testObject->bar = 'bar';
-               return array(
-                       'integer in multi level array' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 42
-                                               ),
-                                               'bar2' => array()
-                                       )
-                               ),
-                               'foo/bar/baz',
-                               42
-                       ),
-                       'zero integer in multi level array' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 0
-                                               )
-                                       )
-                               ),
-                               'foo/bar/baz',
-                               0
-                       ),
-                       'NULL value in multi level array' => array(
-                               array(
-                                       'foo' => array(
-                                               'baz' => NULL
-                                       )
-                               ),
-                               'foo/baz',
-                               NULL
-                       ),
-                       'get string value' => array(
-                               array(
-                                       'foo' => array(
-                                               'baz' => 'this is a test string'
-                                       )
-                               ),
-                               'foo/baz',
-                               'this is a test string'
-                       ),
-                       'get boolean value: FALSE' => array(
-                               array(
-                                       'foo' => array(
-                                               'baz' => FALSE
-                                       )
-                               ),
-                               'foo/baz',
-                               FALSE
-                       ),
-                       'get boolean value: TRUE' => array(
-                               array(
-                                       'foo' => array(
-                                               'baz' => TRUE
-                                       )
-                               ),
-                               'foo/baz',
-                               TRUE
-                       ),
-                       'get object value' => array(
-                               array(
-                                       'foo' => array(
-                                               'baz' => $testObject
-                                       )
-                               ),
-                               'foo/baz',
-                               $testObject
-                       ),
-                       'enclosed path' => array(
-                               array(
-                                       'foo/bar' => array(
-                                               'foobar' => 42
-                                       )
-                               ),
-                               '"foo/bar"/foobar',
-                               42
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider getValueByPathValidDataProvider
-        */
-       public function getValueByPathGetsCorrectValue(array $array, $path, $expectedResult) {
-               $this->assertEquals($expectedResult, \TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath($array, $path));
-       }
-
-       /**
-        * @test
-        */
-       public function getValueByPathAccpetsDifferentDelimeter() {
-               $input = array(
-                       'foo' => array(
-                               'bar' => array(
-                                       'baz' => 42
-                               ),
-                               'bar2' => array()
-                       )
-               );
-               $searchPath = 'foo%bar%baz';
-               $expected = 42;
-               $delimeter = '%';
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath($input, $searchPath, $delimeter));
-       }
-
-       ///////////////////////
-       // Tests concerning setValueByPath
-       ///////////////////////
-       /**
-        * @test
-        * @expectedException RuntimeException
-        */
-       public function setValueByPathThrowsExceptionIfPathIsEmpty() {
-               \TYPO3\CMS\Core\Utility\ArrayUtility::setValueByPath(array(), '', NULL);
-       }
-
-       /**
-        * @test
-        * @expectedException RuntimeException
-        */
-       public function setValueByPathThrowsExceptionIfPathIsNotAString() {
-               \TYPO3\CMS\Core\Utility\ArrayUtility::setValueByPath(array(), array('foo'), NULL);
-       }
-
-       /**
-        * Data provider for setValueByPathSetsCorrectValueDataProvider
-        *
-        * Every array splits into:
-        * - Array to set value in
-        * - String path
-        * - Value to set
-        * - Expected result
-        */
-       public function setValueByPathSetsCorrectValueDataProvider() {
-               $testObject = new StdClass();
-               $testObject->foo = 'foo';
-               $testObject->bar = 'bar';
-               return array(
-                       'set integer value: 42' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 0
-                                               )
-                                       )
-                               ),
-                               'foo/bar/baz',
-                               42,
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 42
-                                               )
-                                       )
-                               )
-                       ),
-                       'set integer value: 0' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 42
-                                               )
-                                       )
-                               ),
-                               'foo/bar/baz',
-                               0,
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 0
-                                               )
-                                       )
-                               )
-                       ),
-                       'set null value' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 42
-                                               )
-                                       )
-                               ),
-                               'foo/bar/baz',
-                               NULL,
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => NULL
-                                               )
-                                       )
-                               )
-                       ),
-                       'set array value' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 42
-                                               )
-                                       )
-                               ),
-                               'foo/bar/baz',
-                               array(
-                                       'foo' => 123
-                               ),
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => array(
-                                                               'foo' => 123
-                                                       )
-                                               )
-                                       )
-                               )
-                       ),
-                       'set boolean value: FALSE' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => TRUE
-                                               )
-                                       )
-                               ),
-                               'foo/bar/baz',
-                               FALSE,
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => FALSE
-                                               )
-                                       )
-                               )
-                       ),
-                       'set boolean value: TRUE' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => NULL
-                                               )
-                                       )
-                               ),
-                               'foo/bar/baz',
-                               TRUE,
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => TRUE
-                                               )
-                                       )
-                               )
-                       ),
-                       'set object value' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => NULL
-                                               )
-                                       )
-                               ),
-                               'foo/bar/baz',
-                               $testObject,
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => $testObject
-                                               )
-                                       )
-                               )
-                       ),
-                       'multi keys in array' => array(
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 'value'
-                                               ),
-                                               'bar2' => array(
-                                                       'baz' => 'value'
-                                               )
-                                       )
-                               ),
-                               'foo/bar2/baz',
-                               'newValue',
-                               array(
-                                       'foo' => array(
-                                               'bar' => array(
-                                                       'baz' => 'value'
-                                               ),
-                                               'bar2' => array(
-                                                       'baz' => 'newValue'
-                                               )
-                                       )
-                               )
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider setValueByPathSetsCorrectValueDataProvider
-        */
-       public function setValueByPathSetsCorrectValue(array $array, $path, $value, $expectedResult) {
-               $this->assertEquals($expectedResult, \TYPO3\CMS\Core\Utility\ArrayUtility::setValueByPath($array, $path, $value));
-       }
-
-       ///////////////////////
-       // Tests concerning sortByKeyRecursive
-       ///////////////////////
-       /**
-        * @test
-        */
-       public function sortByKeyRecursiveCheckIfSortingIsCorrect() {
-               $unsortedArray = array(
-                       'z' => NULL,
-                       'a' => NULL,
-                       'd' => array(
-                               'c' => NULL,
-                               'b' => NULL,
-                               'd' => NULL,
-                               'a' => NULL
-                       )
-               );
-               $expectedResult = array(
-                       'a' => NULL,
-                       'd' => array(
-                               'a' => NULL,
-                               'b' => NULL,
-                               'c' => NULL,
-                               'd' => NULL
-                       ),
-                       'z' => NULL
-               );
-               $this->assertSame($expectedResult, \TYPO3\CMS\Core\Utility\ArrayUtility::sortByKeyRecursive($unsortedArray));
-       }
-
-       ///////////////////////
-       // Tests concerning arrayExport
-       ///////////////////////
-       /**
-        * @test
-        */
-       public function arrayExportReturnsFormattedMultidimensionalArray() {
-               $array = array(
-                       'foo' => array(
-                               'bar' => 42,
-                               'bar2' => array(
-                                       'baz' => 'val\'ue',
-                                       'baz2' => TRUE,
-                                       'baz3' => FALSE,
-                                       'baz4' => array()
-                               )
-                       ),
-                       'baz' => 23,
-                       'foobar' => NULL
-               );
-               $expected = ((((((((((((((((((((((((((((((((((((((((((((('array(' . LF) . TAB) . '\'foo\' => array(') . LF) . TAB) . TAB) . '\'bar\' => 42,') . LF) . TAB) . TAB) . '\'bar2\' => array(') . LF) . TAB) . TAB) . TAB) . '\'baz\' => \'val\\\'ue\',') . LF) . TAB) . TAB) . TAB) . '\'baz2\' => TRUE,') . LF) . TAB) . TAB) . TAB) . '\'baz3\' => FALSE,') . LF) . TAB) . TAB) . TAB) . '\'baz4\' => array(),') . LF) . TAB) . TAB) . '),') . LF) . TAB) . '),') . LF) . TAB) . '\'baz\' => 23,') . LF) . TAB) . '\'foobar\' => NULL,') . LF) . ')';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array));
-       }
-
-       /**
-        * @test
-        * @expectedException RuntimeException
-        */
-       public function arrayExportThrowsExceptionIfObjectShouldBeExported() {
-               $array = array(
-                       'foo' => array(
-                               'bar' => new stdClass()
-                       )
-               );
-               \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array);
-       }
-
-       /**
-        * @test
-        */
-       public function arrayExportReturnsNumericArrayKeys() {
-               $array = array(
-                       'foo' => 'string key',
-                       23 => 'integer key',
-                       '42' => 'string key representing integer'
-               );
-               $expected = (((((((((('array(' . LF) . TAB) . '\'foo\' => \'string key\',') . LF) . TAB) . '23 => \'integer key\',') . LF) . TAB) . '42 => \'string key representing integer\',') . LF) . ')';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array));
-       }
-
-       /**
-        * @test
-        */
-       public function arrayExportReturnsNoKeyIndexForConsecutiveCountedArrays() {
-               $array = array(
-                       0 => 'zero',
-                       1 => 'one',
-                       2 => 'two'
-               );
-               $expected = (((((((((('array(' . LF) . TAB) . '\'zero\',') . LF) . TAB) . '\'one\',') . LF) . TAB) . '\'two\',') . LF) . ')';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array));
-       }
-
-       /**
-        * @test
-        */
-       public function arrayExportReturnsKeyIndexForNonConsecutiveCountedArrays() {
-               $array = array(
-                       0 => 'zero',
-                       1 => 'one',
-                       3 => 'three',
-                       4 => 'four'
-               );
-               $expected = ((((((((((((('array(' . LF) . TAB) . '0 => \'zero\',') . LF) . TAB) . '1 => \'one\',') . LF) . TAB) . '3 => \'three\',') . LF) . TAB) . '4 => \'four\',') . LF) . ')';
-               $this->assertSame($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::arrayExport($array));
-       }
-
-       /**
-        * @param array $array
-        * @param array $expected
-        * @test
-        * @dataProvider arrayIsFlatDataProvider
-        */
-       public function arrayIsFlat(array $array, array $expected) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\ArrayUtility::flatten($array));
-       }
-
-       /**
-        * @return array
-        */
-       public function arrayIsFlatDataProvider() {
-               return array(
-                       'plain array' => array(
-                               array(
-                                       'first' => 1,
-                                       'second' => 2
-                               ),
-                               array(
-                                       'first' => 1,
-                                       'second' => 2
-                               )
-                       ),
-                       'plain array with faulty dots' => array(
-                               array(
-                                       'first.' => 1,
-                                       'second.' => 2
-                               ),
-                               array(
-                                       'first' => 1,
-                                       'second' => 2
-                               )
-                       ),
-                       'nested array of 2 levels' => array(
-                               array(
-                                       'first.' => array(
-                                               'firstSub' => 1
-                                       ),
-                                       'second.' => array(
-                                               'secondSub' => 2
-                                       )
-                               ),
-                               array(
-                                       'first.firstSub' => 1,
-                                       'second.secondSub' => 2
-                               )
-                       ),
-                       'nested array of 2 levels with faulty dots' => array(
-                               array(
-                                       'first.' => array(
-                                               'firstSub.' => 1
-                                       ),
-                                       'second.' => array(
-                                               'secondSub.' => 2
-                                       )
-                               ),
-                               array(
-                                       'first.firstSub' => 1,
-                                       'second.secondSub' => 2
-                               )
-                       ),
-                       'nested array of 3 levels' => array(
-                               array(
-                                       'first.' => array(
-                                               'firstSub.' => array(
-                                                       'firstSubSub' => 1
-                                               )
-                                       ),
-                                       'second.' => array(
-                                               'secondSub.' => array(
-                                                       'secondSubSub' => 2
-                                               )
-                                       )
-                               ),
-                               array(
-                                       'first.firstSub.firstSubSub' => 1,
-                                       'second.secondSub.secondSubSub' => 2
-                               )
-                       ),
-                       'nested array of 3 levels with faulty dots' => array(
-                               array(
-                                       'first.' => array(
-                                               'firstSub.' => array(
-                                                       'firstSubSub.' => 1
-                                               )
-                                       ),
-                                       'second.' => array(
-                                               'secondSub.' => array(
-                                                       'secondSubSub.' => 2
-                                               )
-                                       )
-                               ),
-                               array(
-                                       'first.firstSub.firstSubSub' => 1,
-                                       'second.secondSub.secondSubSub' => 2
-                               )
-                       )
-               );
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/utility/class.t3lib_utility_clientTest.php b/tests/Unit/t3lib/utility/class.t3lib_utility_clientTest.php
deleted file mode 100644 (file)
index 4a931ad..0000000
+++ /dev/null
@@ -1,419 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2010-2011 Steffen Kamper (info@sk-typo3.de)
- * 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!
- ***************************************************************/
-/**
- * Testcase for the t3lib_utility_Client class.
- *
- * @package TYPO3
- * @subpackage t3lib
- * @author Steffen Kamper <info@sk-typo3.de>
- */
-class t3lib_utility_clientTest extends tx_phpunit_testcase {
-
-       /**
-        * backed-up TYPO3_CONF_VARS SC_OPTIONS
-        *
-        * @var array
-        */
-       private $scOptionsBackup = array();
-
-       /**
-        * backed-up T3_VAR callUserFunction
-        *
-        * @var array
-        */
-       private $callUserFunctionBackup = array();
-
-       public function setUp() {
-               $this->scOptionsBackup = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'];
-               $this->callUserFunctionBackup = $GLOBALS['T3_VAR']['callUserFunction'];
-       }
-
-       public function tearDown() {
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'] = $this->scOptionsBackup;
-               $GLOBALS['T3_VAR']['callUserFunction'] = $this->callUserFunctionBackup;
-       }
-
-       //////////////////////////////////////////////////////////
-       // Utility Functions
-       //////////////////////////////////////////////////////////
-       /**
-        * Compares array of UA strings with expected result array of browser/version pair
-        *
-        * @param array $browserStrings array with userAgent strings
-        * @param array $expectedMembers array with expected browser/version for given userAgent strings
-        */
-       private function analyzeUserAgentStrings($browserStrings, $expectedMembers) {
-               $compare = ($expected = array());
-               foreach ($browserStrings as $browserString) {
-                       $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($browserString);
-                       $expected[] = $expectedMembers;
-                       $compare[] = array(
-                               'browser' => $infoArray['browser'],
-                               'version' => substr($infoArray['version'], 0, 1)
-                       );
-               }
-               $this->assertEquals($expected, $compare);
-       }
-
-       //////////////////////////////////////////////////////////
-       // Tests concerning t3lib_utility_Client::getBrowserInfo
-       //////////////////////////////////////////////////////////
-       /**
-        * @test
-        */
-       public function checkBrowserInfoIE6() {
-               $browserStrings = array(
-                       'Mozilla/4.0 (compatible; MSIE 6.1; Windows XP; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
-                       'Mozilla/4.0 (compatible; MSIE 6.1; Windows XP)',
-                       'Mozilla/4.0 (compatible; MSIE 6.01; Windows NT 6.0)',
-                       'Mozilla/5.0 (Windows; U; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
-                       'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
-                       'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4325)',
-                       'Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1)',
-                       'Mozilla/45.0 (compatible; MSIE 6.0; Windows NT 5.1)',
-                       'Mozilla/4.08 (compatible; MSIE 6.0; Windows NT 5.1)',
-                       'Mozilla/4.01 (compatible; MSIE 6.0; Windows NT 5.1)',
-                       'Mozilla/4.0 (X11; MSIE 6.0; i686; .NET CLR 1.1.4322; .NET CLR 2.0.50727; FDM)',
-                       'Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 6.0)',
-                       'Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 5.2)',
-                       'Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 5.0)',
-                       'Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
-                       'Mozilla/4.0 (MSIE 6.0; Windows NT 5.1)',
-                       'Mozilla/4.0 (MSIE 6.0; Windows NT 5.0)',
-                       'Mozilla/4.0 (compatible;MSIE 6.0;Windows 98;Q312461)',
-                       'Mozilla/4.0 (Compatible; Windows NT 5.1; MSIE 6.0) (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)',
-                       'Mozilla/4.0 (compatible; U; MSIE 6.0; Windows NT 5.1)',
-                       'Mozilla/4.0 (compatible; MSIE 6,0; Windows NT 5,1; SV1; Alexa Toolbar)'
-               );
-               $expectedMembers = array(
-                       'browser' => 'msie',
-                       'version' => '6'
-               );
-               $this->analyzeUserAgentStrings($browserStrings, $expectedMembers);
-       }
-
-       /**
-        * @test
-        */
-       public function checkBrowserInfoIE7() {
-               $browserStrings = array(
-                       'Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; en-US)',
-                       'Mozilla/5.0 (Windows; U; MSIE 7.0; Windows NT 6.0; el-GR)',
-                       'Mozilla/5.0 (MSIE 7.0; Macintosh; U; SunOS; X11; gu; SV1; InfoPath.2; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)',
-                       'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; c .NET CLR 3.0.04506; .NET CLR 3.5.30707; InfoPath.1; el-GR)',
-                       'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; c .NET CLR 3.0.04506; .NET CLR 3.5.30707; InfoPath.1; el-GR)',
-                       'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; fr-FR)',
-                       'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 6.0; en-US)',
-                       'Mozilla/5.0 (compatible; MSIE 7.0; Windows NT 5.2; WOW64; .NET CLR 2.0.50727)',
-                       'Mozilla/4.79 [en] (compatible; MSIE 7.0; Windows NT 5.0; .NET CLR 2.0.50727; InfoPath.2; .NET CLR 1.1.4322; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)',
-                       'Mozilla/4.0 (Windows; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)',
-                       'Mozilla/4.0 (Mozilla/4.0; MSIE 7.0; Windows NT 5.1; FDM; SV1; .NET CLR 3.0.04506.30)',
-                       'Mozilla/4.0 (Mozilla/4.0; MSIE 7.0; Windows NT 5.1; FDM; SV1)',
-                       'Mozilla/4.0 (compatible;MSIE 7.0;Windows NT 6.0)',
-                       'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)',
-                       'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0;)',
-                       'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; YPC 3.2.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618)',
-                       'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; YPC 3.2.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)',
-                       'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; Media Center PC 5.0; .NET CLR 2.0.50727)',
-                       'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 3.0.04506)',
-                       'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; InfoPath.2; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET CLR 1.1.4322)'
-               );
-               $expectedMembers = array(
-                       'browser' => 'msie',
-                       'version' => '7'
-               );
-               $this->analyzeUserAgentStrings($browserStrings, $expectedMembers);
-       }
-
-       /**
-        * @test
-        */
-       public function checkBrowserInfoIE8() {
-               $browserStrings = array(
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.2; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; InfoPath.2)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Zune 3.0)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; msn OptimizedIE8;ZHCN)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; Zune 4.0)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; yie8)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; Zune 3.0; MS-RTC LM 8)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; MS-RTC LM 8; Zune 4.0)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; MS-RTC LM 8)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; FDM; OfficeLiveConnector.1.4; OfficeLivePatch.1.3; .NET CLR 1.1.4322)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E; FDM)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 4.0.20402; MS-RTC LM 8)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; InfoPath.2; MS-RTC LM 8)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; InfoPath.2)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; InfoPath.3; .NET CLR 4.0.20506)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; MRA 5.5 (build 02842); SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)',
-                       'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729)'
-               );
-               $expectedMembers = array(
-                       'browser' => 'msie',
-                       'version' => '8'
-               );
-               $this->analyzeUserAgentStrings($browserStrings, $expectedMembers);
-       }
-
-       /**
-        * @test
-        */
-       public function checkGeckoVersion() {
-               $userAgentString = 'Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertEquals('1.9.2.3', $infoArray['all']['gecko']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows7() {
-               $userAgentString = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0)';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('win7', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsVista() {
-               $userAgentString = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.04506)';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('winVista', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsXp() {
-               $userAgentString = 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('winXP', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2k() {
-               $userAgentString = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('win2k', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindows2kServicePack1() {
-               $userAgentString = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.01; SV1)';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('win2k', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfWindowsNt() {
-               $userAgentString = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('winNT', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpad() {
-               $userAgentString = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('iOS', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIphone() {
-               $userAgentString = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('iOS', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfIpod() {
-               $userAgentString = 'Mozilla/5.0 (iPod; U; CPU like Mac OS X; en) AppleWebKit/420.1 (KHTML, like Geckto) Version/3.0 Mobile/3A101a Safari/419.3';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('iOS', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfMacOsX() {
-               $userAgentString = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-us) AppleWebKit/534.15+ (KHTML, like Gecko) Version/5.0.3 Safari/533.19.4';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('mac', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfLinux() {
-               $userAgentString = 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('linux', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfSolaris() {
-               $userAgentString = 'Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.1.9) Gecko/20100525 Firefox/3.5.9';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('unix_sun', $infoArray['all_systems']);
-       }
-
-       /**
-        * Provide various user agent strings for android devices
-        *
-        * @static
-        * @return array List of user agents
-        */
-       static public function androidUserAgentsProvider() {
-               $agents = array(
-                       'defaultBrowser' => array(
-                               'agent' => 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1'
-                       ),
-                       'operaMini' => array(
-                               'agent' => 'Opera/9.80 (Android; Opera Mini/6.0.24556/24.816; U; en) Presto/2.5.25 Version/10.54'
-                       )
-               );
-               return $agents;
-       }
-
-       /**
-        * @test
-        * @dataProvider androidUserAgentsProvider
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfAndroid($userAgentString) {
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('android', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfOpenbsd() {
-               $userAgentString = 'Links (1.00pre20; OpenBSD 4.8 i386; 80x25)';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('unix_bsd', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfNetbsd() {
-               $userAgentString = 'Links (2.2; NetBSD 5.1 amd64; 80x25)';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('unix_bsd', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfFreebsd() {
-               $userAgentString = 'Mozilla/5.0 (X11; U; FreeBSD amd64; c) AppleWebKit/531.2+ (KHTML, like Gecko) Safari 531.2+ Epiphany/230.2';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('unix_bsd', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectSystemValueForUserAgentStringOfChromeOs() {
-               $userAgentString = 'Mozilla/5.0 (X11; U; CrOS i686  9.10.0; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.253.0 Safari 532.5';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertContains('chrome', $infoArray['all_systems']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfSafari() {
-               $userAgentString = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertSame('safari', $infoArray['browser']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfFirefox() {
-               $userAgentString = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b8) Gecko/20100101 Firefox/4.0b8';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertSame('firefox', $infoArray['browser']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfOpera() {
-               $userAgentString = 'Opera/9.80 (X11; FreeBSD 8.1-RELEASE amd64; U; en) Presto/2.2.15 Version/10.10';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertSame('opera', $infoArray['browser']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnAndroid() {
-               $userAgentString = 'Mozilla/5.0 (Linux; U; Android WildPuzzleROM v8.0.7 froyo 2.2; de-de; HTC Wildfire Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertSame('safari', $infoArray['browser']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfMobileSafariOnIphone() {
-               $userAgentString = 'Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertSame('safari', $infoArray['browser']);
-       }
-
-       /**
-        * @test
-        */
-       public function getBrowserInfoReturnsCorrectBrowserValueForUserAgentStringOfKonqueror() {
-               $userAgentString = 'Mozilla/5.0 (compatible; Konqueror/4.4; FreeBSD) KHTML/4.4.5 (like Gecko)';
-               $infoArray = \TYPO3\CMS\Core\Utility\ClientUtility::getBrowserInfo($userAgentString);
-               $this->assertSame('konqueror', $infoArray['browser']);
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/utility/class.t3lib_utility_httpTest.php b/tests/Unit/t3lib/utility/class.t3lib_utility_httpTest.php
deleted file mode 100644 (file)
index be892f0..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2012 Oliver Hader <oliver.hader@typo3.org>
- * 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.
- * 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
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for class t3lib_utility_Http
- *
- * @author Oliver Hader <oliver.hader@typo3.org>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_utility_HttpTest extends tx_phpunit_testcase {
-
-       /**
-        * @param array $urlParts
-        * @param string $expected
-        * @dataProvider isUrlBuiltCorrectlyDataProvider
-        * @test
-        */
-       public function isUrlBuiltCorrectly(array $urlParts, $expected) {
-               $url = \TYPO3\CMS\Core\Utility\HttpUtility::buildUrl($urlParts);
-               $this->assertEquals($expected, $url);
-       }
-
-       /**
-        * @return array
-        */
-       public function isUrlBuiltCorrectlyDataProvider() {
-               return array(
-                       'rebuild url withouth scheme' => array(
-                               parse_url('typo3.org/path/index.php'),
-                               'typo3.org/path/index.php'
-                       ),
-                       'rebuild url with scheme' => array(
-                               parse_url('http://typo3.org/path/index.php'),
-                               'http://typo3.org/path/index.php'
-                       ),
-                       'rebuild url with all properties' => array(
-                               parse_url('http://editor:secret@typo3.org/path/index.php?query=data#fragment'),
-                               'http://editor:secret@typo3.org/path/index.php?query=data#fragment'
-                       ),
-                       'url without username, but password' => array(
-                               array(
-                                       'scheme' => 'http',
-                                       'pass' => 'secrept',
-                                       'host' => 'typo3.org'
-                               ),
-                               'http://typo3.org'
-                       )
-               );
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/utility/class.t3lib_utility_mailTest.php b/tests/Unit/t3lib/utility/class.t3lib_utility_mailTest.php
deleted file mode 100644 (file)
index 9d7df76..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2010-2011 Oliver Klee (typo3-coding@oliverklee.de)
- * 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!
- ***************************************************************/
-/**
- * Testcase for the t3lib_utility_Mail class.
- *
- * @package TYPO3
- * @subpackage t3lib
- * @author Oliver Klee <typo3-coding@oliverklee.de>
- */
-class t3lib_utility_MailTest extends tx_phpunit_testcase {
-
-       /**
-        * backed-up TYPO3_CONF_VARS SC_OPTIONS
-        *
-        * @var array
-        */
-       private $scOptionsBackup = array();
-
-       /**
-        * backed-up T3_VAR callUserFunction
-        *
-        * @var array
-        */
-       private $callUserFunctionBackup = array();
-
-       public function setUp() {
-               $this->scOptionsBackup = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'];
-               $this->callUserFunctionBackup = $GLOBALS['T3_VAR']['callUserFunction'];
-       }
-
-       public function tearDown() {
-               \TYPO3\CMS\Core\Utility\GeneralUtility::purgeInstances();
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'] = $this->scOptionsBackup;
-               $GLOBALS['T3_VAR']['callUserFunction'] = $this->callUserFunctionBackup;
-       }
-
-       //////////////////////////
-       // Tests concerning mail
-       //////////////////////////
-       /**
-        * @test
-        */
-       public function mailCallsHook() {
-               $this->doMailCallsHook();
-       }
-
-       /**
-        * @test
-        */
-       public function mailCallsHookWithDefaultMailFrom() {
-               $this->doMailCallsHook('no-reply@localhost', 'TYPO3 Mailer');
-       }
-
-       /**
-        * Method called from tests mailCallsHook() and mailCallsHookWithDefaultMailFrom().
-        */
-       protected function doMailCallsHook($fromAddress = '', $fromName = '') {
-               // Backup configuration
-               $mailConfigurationBackup = $GLOBALS['TYPO3_CONF_VARS']['MAIL'];
-               $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] = $fromAddress;
-               $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'] = $fromName;
-               $to = 'john@example.com';
-               $subject = 'Good news everybody!';
-               $messageBody = 'The hooks works!';
-               $additionalHeaders = 'Reply-to: jane@example.com';
-               $additionalParameters = '-f postmaster@example.com';
-               $fakeThis = FALSE;
-               $additionalHeadersExpected = $additionalHeaders;
-               if ($fromAddress !== '' && $fromName !== '') {
-                       $additionalHeadersExpected .= LF . sprintf('From: "%s" <%s>', $fromName, $fromAddress);
-               }
-               $mockMailer = $this->getMock('TYPO3\\CMS\\Core\\Mail\\MailerAdapterInterface', array('mail'));
-               $mockClassName = get_class($mockMailer);
-               \TYPO3\CMS\Core\Utility\GeneralUtility::addInstance($mockClassName, $mockMailer);
-               $mockMailer->expects($this->once())->method('mail')->with($to, $subject, $messageBody, $additionalHeadersExpected, $additionalParameters, $fakeThis);
-               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/utility/class.t3lib_utility_mail.php']['substituteMailDelivery'] = array($mockClassName);
-               \TYPO3\CMS\Core\Utility\MailUtility::mail($to, $subject, $messageBody, $additionalHeaders, $additionalParameters);
-               // Restore configuration
-               $GLOBALS['TYPO3_CONF_VARS']['MAIL'] = $mailConfigurationBackup;
-       }
-
-       /**
-        * @test
-        */
-       public function breakLinesForEmailReturnsEmptyStringIfEmptryStringIsGiven() {
-               $this->assertEmpty(\TYPO3\CMS\Core\Utility\MailUtility::breakLinesForEmail(''));
-       }
-
-       /**
-        * @test
-        */
-       public function breakLinesForEmailReturnsOneLineIfCharWithIsNotExceeded() {
-               $newlineChar = LF;
-               $lineWidth = 76;
-               $str = 'This text is not longer than 76 chars and therefore will not be broken.';
-               $returnString = \TYPO3\CMS\Core\Utility\MailUtility::breakLinesForEmail($str, $newlineChar, $lineWidth);
-               $this->assertEquals(1, count(explode($newlineChar, $returnString)));
-       }
-
-       /**
-        * @test
-        */
-       public function breakLinesForEmailBreaksTextIfCharWithIsExceeded() {
-               $newlineChar = LF;
-               $lineWidth = 50;
-               $str = 'This text is longer than 50 chars and therefore will be broken.';
-               $returnString = \TYPO3\CMS\Core\Utility\MailUtility::breakLinesForEmail($str, $newlineChar, $lineWidth);
-               $this->assertEquals(2, count(explode($newlineChar, $returnString)));
-       }
-
-       /**
-        * @test
-        */
-       public function breakLinesForEmailBreaksTextWithNoSpaceFoundBeforeLimit() {
-               $newlineChar = LF;
-               $lineWidth = 10;
-               // first space after 20 chars (more than $lineWidth)
-               $str = 'abcdefghijklmnopqrst uvwxyz 123456';
-               $returnString = \TYPO3\CMS\Core\Utility\MailUtility::breakLinesForEmail($str, $newlineChar, $lineWidth);
-               $this->assertEquals($returnString, ((('abcdefghijklmnopqrst' . LF) . 'uvwxyz') . LF) . '123456');
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/utility/class.t3lib_utility_pathTest.php b/tests/Unit/t3lib/utility/class.t3lib_utility_pathTest.php
deleted file mode 100644 (file)
index a0ea346..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-<?php
-/***************************************************************
- * Copyright notice
- *
- * (c) 2012 Oliver Hader <oliver.hader@typo3.org>
- * 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.
- * 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
- * GNU General Public License for more details.
- *
- * This copyright notice MUST APPEAR in all copies of the script!
- ***************************************************************/
-/**
- * Testcase for class t3lib_utility_Path
- *
- * @author Oliver Hader <oliver.hader@typo3.org>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_utility_PathTest extends tx_phpunit_testcase {
-
-       /**
-        * @param array $paths
-        * @param string $expected
-        * @dataProvider isCommonPrefixResolvedCorrectlyDataProvider
-        * @test
-        */
-       public function isCommonPrefixResolvedCorrectly(array $paths, $expected) {
-               $commonPrefix = \TYPO3\CMS\Core\Utility\PathUtility::getCommonPrefix($paths);
-               $this->assertEquals($expected, $commonPrefix);
-       }
-
-       /**
-        * @return array
-        */
-       public function isCommonPrefixResolvedCorrectlyDataProvider() {
-               return array(
-                       array(
-                               array(
-                                       '/var/www/myhost.com/t3lib/'
-                               ),
-                               '/var/www/myhost.com/t3lib/'
-                       ),
-                       array(
-                               array(
-                                       '/var/www/myhost.com/t3lib/',
-                                       '/var/www/myhost.com/t3lib/'
-                               ),
-                               '/var/www/myhost.com/t3lib/'
-                       ),
-                       array(
-                               array(
-                                       '/var/www/myhost.com/typo3/',
-                                       '/var/www/myhost.com/t3lib/'
-                               ),
-                               '/var/www/myhost.com/'
-                       ),
-                       array(
-                               array(
-                                       '/var/www/myhost.com/uploads/',
-                                       '/var/www/myhost.com/typo3/',
-                                       '/var/www/myhost.com/t3lib/'
-                               ),
-                               '/var/www/myhost.com/'
-                       ),
-                       array(
-                               array(
-                                       '/var/www/myhost.com/uploads/directory/',
-                                       '/var/www/myhost.com/typo3/sysext/',
-                                       '/var/www/myhost.com/typo3/contrib/',
-                                       '/var/www/myhost.com/t3lib/utility/'
-                               ),
-                               '/var/www/myhost.com/'
-                       )
-               );
-       }
-
-       /**
-        * @param string $source
-        * @param string $target
-        * @param string $expected
-        * @dataProvider isRelativePathResolvedCorrectlyDataProvider
-        * @test
-        */
-       public function isRelativePathResolvedCorrectly($source, $target, $expected) {
-               $relativePath = \TYPO3\CMS\Core\Utility\PathUtility::getRelativePath($source, $target);
-               $this->assertEquals($expected, $relativePath);
-       }
-
-       /**
-        * @return array
-        */
-       public function isRelativePathResolvedCorrectlyDataProvider() {
-               return array(
-                       array(
-                               '/',
-                               PATH_site . 'directory',
-                               NULL
-                       ),
-                       array(
-                               PATH_site . 't3lib/',
-                               PATH_site . 't3lib/',
-                               ''
-                       ),
-                       array(
-                               PATH_site . 'typo3/',
-                               PATH_site . 't3lib/',
-                               '../t3lib/'
-                       ),
-                       array(
-                               PATH_site,
-                               PATH_site . 't3lib/',
-                               't3lib/'
-                       ),
-                       array(
-                               PATH_site . 't3lib/',
-                               PATH_site . 't3lib/stddb/',
-                               'stddb/'
-                       ),
-                       array(
-                               PATH_site . 'typo3/sysext/cms/',
-                               PATH_site . 't3lib/utility/',
-                               '../../../t3lib/utility/'
-                       )
-               );
-       }
-
-       /**
-        * @param string $path
-        * @param string $separator
-        * @param string $expected
-        * @dataProvider isTrailingSeparatorSanitizedCorrectlyDataProvider
-        * @test
-        */
-       public function isTrailingSeparatorSanitizedCorrectly($path, $separator, $expected) {
-               $sanitizedPath = \TYPO3\CMS\Core\Utility\PathUtility::sanitizeTrailingSeparator($path, $separator);
-               $this->assertEquals($expected, $sanitizedPath);
-       }
-
-       /**
-        * @return array
-        */
-       public function isTrailingSeparatorSanitizedCorrectlyDataProvider() {
-               return array(
-                       array('/var/www//', '/', '/var/www/'),
-                       array('/var/www/', '/', '/var/www/'),
-                       array('/var/www', '/', '/var/www/')
-               );
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/utility/class.t3lib_utility_stringTest.php b/tests/Unit/t3lib/utility/class.t3lib_utility_stringTest.php
deleted file mode 100644 (file)
index 6a30829..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2011 Susanne Moog <typo3@susanne-moog.de>
- *  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!
- ***************************************************************/
-/**
- * Testcase for class \TYPO3\CMS\Core\Utility\StringUtility
- *
- * @author Susanne Moog <typo3@susanne-moog.de>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_utility_StringTest extends tx_phpunit_testcase {
-
-       /**
-        * Data provider for isLastPartOfStrReturnsTrueForMatchingLastParts
-        *
-        * @return array
-        */
-       public function isLastPartOfStringReturnsTrueForMatchingFirstPartDataProvider() {
-               return array(
-                       'match last part of string' => array('hello world', 'world'),
-                       'match last char of string' => array('hellod world', 'd'),
-                       'match whole string' => array('hello', 'hello'),
-                       'integer is part of string with same number' => array('24', 24),
-                       'string is part of integer with same number' => array(24, '24'),
-                       'integer is part of string starting with same number' => array('please gimme beer, 24', 24)
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider isLastPartOfStringReturnsTrueForMatchingFirstPartDataProvider
-        */
-       public function isLastPartOfStringReturnsTrueForMatchingFirstPart($string, $part) {
-               $this->assertTrue(\TYPO3\CMS\Core\Utility\StringUtility::isLastPartOfString($string, $part));
-       }
-
-       /**
-        * Data provider for checkisLastPartOfStringReturnsFalseForNotMatchingFirstParts
-        *
-        * @return array
-        */
-       public function isLastPartOfStringReturnsFalseForNotMatchingFirstPartDataProvider() {
-               return array(
-                       'no string match' => array('hello', 'bye'),
-                       'no case sensitive string match' => array('hello world', 'World'),
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider isLastPartOfStringReturnsFalseForNotMatchingFirstPartDataProvider
-        */
-       public function isLastPartOfStringReturnsFalseForNotMatchingFirstPart($string, $part) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\StringUtility::isLastPartOfString($string, $part));
-       }
-
-       /**
-        * Data provider for isLastPartOfStringReturnsThrowsExceptionWithInvalidArguments
-        *
-        * @return array
-        */
-       public function isLastPartOfStringReturnsInvalidArgumentDataProvider() {
-               return array(
-                       'array is not part of string' => array('string', array()),
-                       'string is not part of array' => array(array(), 'string'),
-                       'NULL is not part of string' => array('string', NULL),
-                       'null is not part of array' => array(NULL, 'string'),
-                       'NULL is not part of array' => array(array(), NULL),
-                       'array is not part of null' => array(NULL, array()),
-                       'NULL is not part of empty string' => array('', NULL),
-                       'false is not part of empty string' => array('', FALSE),
-                       'empty string is not part of NULL' => array(NULL, ''),
-                       'empty string is not part of false' => array(FALSE, ''),
-                       'empty string is not part of zero integer' => array(0, ''),
-                       'zero integer is not part of NULL' => array(NULL, 0),
-                       'zero integer is not part of empty string' => array('', 0),
-                       'string is not part of object' => array(new \stdClass(), 'foo'),
-                       'object is not part of string' => array('foo', new \stdClass()),
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider isLastPartOfStringReturnsInvalidArgumentDataProvider
-        * @expectedException \InvalidArgumentException
-        */
-       public function isLastPartOfStringReturnsThrowsExceptionWithInvalidArguments($string, $part) {
-               $this->assertFalse(\TYPO3\CMS\Core\Utility\StringUtility::isLastPartOfString($string, $part));
-       }
-}
-
-?>
\ No newline at end of file
diff --git a/tests/Unit/t3lib/utility/class.t3lib_utility_versionNumberTest.php b/tests/Unit/t3lib/utility/class.t3lib_utility_versionNumberTest.php
deleted file mode 100644 (file)
index be1241b..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-<?php
-/***************************************************************
- *  Copyright notice
- *
- *  (c) 2011 Susanne Moog <typo3@susanne-moog.de>
- *  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!
- ***************************************************************/
-/**
- * Testcase for class t3lib_utility_VersionNumber
- *
- * @author Susanne Moog <typo3@susanne-moog.de>
- * @package TYPO3
- * @subpackage t3lib
- */
-class t3lib_utility_VersionNumberTest extends tx_phpunit_testcase {
-
-       /**
-        * Data Provider for convertVersionNumberToIntegerConvertsVersionNumbersToIntegers
-        *
-        * @return array
-        */
-       public function validVersionNumberDataProvider() {
-               return array(
-                       array('4003003', '4.3.3'),
-                       array('4012003', '4.12.3'),
-                       array('5000000', '5.0.0'),
-                       array('3008001', '3.8.1'),
-                       array('1012', '0.1.12')
-               );
-       }
-
-       /**
-        * Data Provider for convertIntegerToVersionNumberConvertsOtherTypesAsIntegerToVersionNumber
-        *
-        * @see http://php.net/manual/en/language.types.php
-        * @return array
-        */
-       public function invalidVersionNumberDataProvider() {
-               return array(
-                       'boolean' => array(TRUE),
-                       'float' => array(5.4),
-                       'array' => array(array()),
-                       'string' => array('300ABCD'),
-                       'object' => array(new stdClass()),
-                       'NULL' => array(NULL),
-                       'function' => array(function () {
-
-                       })
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider validVersionNumberDataProvider
-        */
-       public function convertVersionNumberToIntegerConvertsVersionNumbersToIntegers($expected, $version) {
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger($version));
-       }
-
-       /**
-        * @test
-        * @dataProvider validVersionNumberDataProvider
-        */
-       public function convertIntegerToVersionNumberConvertsIntegerToVersionNumber($versionNumber, $expected) {
-               // Make sure incoming value is an integer
-               $versionNumber = (int) $versionNumber;
-               $this->assertEquals($expected, \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertIntegerToVersionNumber($versionNumber));
-       }
-
-       /**
-        * @test
-        * @dataProvider invalidVersionNumberDataProvider
-        */
-       public function convertIntegerToVersionNumberConvertsOtherTypesAsIntegerToVersionNumber($version) {
-               $this->setExpectedException('\\InvalidArgumentException', '', 1334072223);
-               \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertIntegerToVersionNumber($version);
-       }
-
-       /**
-        * @return array
-        */
-       public function getNumericTypo3VersionNumberDataProvider() {
-               return array(
-                       array(
-                               '6.0-dev',
-                               '6.0.0'
-                       ),
-                       array(
-                               '4.5-alpha',
-                               '4.5.0'
-                       ),
-                       array(
-                               '4.5-beta',
-                               '4.5.0'
-                       ),
-                       array(
-                               '4.5-RC',
-                               '4.5.0'
-                       ),
-                       array(
-                               '6.0.1',
-                               '6.0.1'
-                       )
-               );
-       }
-
-       /**
-        * Check whether getNumericTypo3Version handles all kinds of valid
-        * version strings
-        *
-        * @dataProvider getNumericTypo3VersionNumberDataProvider
-        * @test
-        * @param string $currentVersion
-        * @param string $expectedVersion
-        */
-       public function getNumericTypo3VersionNumber($currentVersion, $expectedVersion) {
-               $namespace = 'TYPO3\\CMS\\Core\\Utility';
-               $className = uniqid('VersionNumberUtility');
-               eval(((((((('namespace ' . $namespace . '; class ' . $className) . ' extends \\TYPO3\\CMS\\Core\\Utility\\VersionNumberUtility {') . '  protected static function getCurrentTypo3Version() {') . '    return \'') . $currentVersion) . '\';') . '  }') . '}');
-               $className = $namespace . '\\' . $className;
-               $version = $className::getNumericTypo3Version();
-               $this->assertEquals($expectedVersion, $version);
-       }
-
-       /**
-        * Data provider for convertVersionsStringToVersionNumbersForcesVersionNumberInRange
-        *
-        * @return array
-        */
-       public function convertVersionsStringToVersionNumbersForcesVersionNumberInRangeDataProvider() {
-               return array(
-                       'everything ok' => array(
-                               '4.2.0-4.4.99',
-                               array(
-                                       '4.2.0',
-                                       '4.4.99'
-                               )
-                       ),
-                       'too high value' => array(
-                               '4.2.0-4.4.2990',
-                               array(
-                                       '4.2.0',
-                                       '4.4.999'
-                               )
-                       ),
-                       'empty high value' => array(
-                               '4.2.0-0.0.0',
-                               array(
-                                       '4.2.0',
-                                       ''
-                               )
-                       )
-               );
-       }
-
-       /**
-        * @test
-        * @dataProvider convertVersionsStringToVersionNumbersForcesVersionNumberInRangeDataProvider
-        */
-       public function convertVersionsStringToVersionNumbersForcesVersionNumberInRange($versionString, $expectedResult) {
-               $versions = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionsStringToVersionNumbers($versionString);
-               $this->assertEquals($expectedResult, $versions);
-       }
-
-}
-
-?>
\ No newline at end of file
diff --git a/typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php b/typo3/sysext/backend/Tests/Unit/Configuration/TypoScript/ConditionMatching/ConditionMatcherTest.php
new file mode 100644 (file)
index 0000000..241e88d
--- /dev/null
@@ -0,0 +1,993 @@
+<?php
+namespace TYPO3\CMS\Backend\Tests\Unit\Configuration\TypoScript\ConditionMatching;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2009-2011 Oliver Hader <oliver@typo3.org>
+ *  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!
+ ***************************************************************/
+
+/**
+ * Testcase for class \TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher.
+ *
+ * @author     Oliver Hader <oliver@typo3.org>
+ * @package TYPO3
+ * @subpackage t3lib
+ */
+class ConditionMatcherTest extends \tx_phpunit_testcase {
+
+       /**
+        * @var array
+        */
+       private $backupGlobalVariables;
+
+       /**
+        * @var array
+        */
+       private $rootline;
+
+       /**
+        * @var \TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher
+        */
+       private $matchCondition;
+
+       /**
+        * @var string
+        */
+       private $testTableName;
+
+       public function setUp() {
+               $this->backupGlobalVariables = array(
+                       '_ENV' => $_ENV,
+                       '_GET' => $_GET,
+                       '_POST' => $_POST,
+                       '_SERVER' => $_SERVER,
+                       'TCA' => $GLOBALS['TCA'],
+                       'TYPO3_DB' => $GLOBALS['TYPO3_DB'],
+                       'TYPO3_CONF_VARS' => $GLOBALS['TYPO3_CONF_VARS'],
+                       'T3_VAR' => $GLOBALS['T3_VAR'],
+                       'BE_USER' => $GLOBALS['BE_USER'],
+                       'SOBE' => $GLOBALS['SOBE']
+               );
+               $this->testTableName = 'TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher_testTable';
+               $this->testGlobalNamespace = uniqid('TEST');
+               $GLOBALS['TCA'][$this->testTableName] = array('ctrl' => array());
+               $GLOBALS[$this->testGlobalNamespace] = array();
+               $this->setUpBackend();
+               $this->matchCondition = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Configuration\\TypoScript\\ConditionMatching\\ConditionMatcher');
+       }
+
+       public function tearDown() {
+               foreach ($this->backupGlobalVariables as $key => $data) {
+                       $GLOBALS[$key] = $data;
+               }
+               unset($this->matchCondition);
+               unset($this->backupGlobalVariables);
+               unset($GLOBALS[$this->testGlobalNamespace]);
+       }
+
+       private function setUpBackend() {
+               $this->rootline = array(
+                       2 => array('uid' => 121, 'pid' => 111),
+                       1 => array('uid' => 111, 'pid' => 101),
+                       0 => array('uid' => 101, 'pid' => 0)
+               );
+               $GLOBALS['BE_USER'] = $this->getMock('beUserAuth', array(), array(), '', FALSE);
+       }
+
+       private function setUpDatabaseMockForDeterminePageId() {
+               $GLOBALS['TYPO3_DB'] = $this->getMock('TYPO3\\CMS\\Core\\Database\\DatabaseConnection', array('exec_SELECTquery', 'sql_fetch_assoc', 'sql_free_result'));
+               $GLOBALS['TYPO3_DB']->expects($this->any())->method('exec_SELECTquery')->will($this->returnCallback(array($this, 'determinePageIdByRecordDatabaseExecuteCallback')));
+               $GLOBALS['TYPO3_DB']->expects($this->any())->method('sql_fetch_assoc')->will($this->returnCallback(array($this, 'determinePageIdByRecordDatabaseFetchCallback')));
+       }
+
+       /**
+        * Tests whether a faulty expression fails.
+        *
+        * @test
+        */
+       public function simulateDisabledMatchAllConditionsFailsOnFaultyExpression() {
+               $this->matchCondition->matchAll = FALSE;
+               $this->assertFalse($this->matchCondition->match('[nullCondition = This expression would return FALSE in general]'));
+       }
+
+       /**
+        * Tests whether simulating positive matches for all conditions succeeds.
+        *
+        * @test
+        */
+       public function simulateEnabledMatchAllConditionsSucceeds() {
+               $this->matchCondition->setSimulateMatchResult(TRUE);
+               $this->assertTrue($this->matchCondition->match('[nullCondition = This expression would return FALSE in general]'));
+       }
+
+       /**
+        * Tests whether simulating positive matches for specific conditions succeeds.
+        *
+        * @test
+        */
+       public function simulateEnabledMatchSpecificConditionsSucceeds() {
+               $testCondition = ('[' . uniqid('test')) . ' = Any condition to simulate a positive match]';
+               $this->matchCondition->setSimulateMatchConditions(array($testCondition));
+               $this->assertTrue($this->matchCondition->match($testCondition));
+       }
+
+       /**
+        * Tests whether a condition matches Internet Explorer 7 on Windows.
+        *
+        * @return      void
+        * @test
+        */
+       public function conditionMatchesInternetExplorer7Windows() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)';
+               $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]');
+               $this->assertTrue($result);
+       }
+
+       /**
+        * Tests whether a condition does not match Internet Explorer 7 on Windows.
+        *
+        * @return      void
+        * @test
+        */
+       public function conditionDoesNotMatchInternetExplorer7Windows() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Opera/9.25 (Windows NT 6.0; U; en)';
+               $result = $this->matchCondition->match('[browser = msie] && [version = 7] && [system = winNT]');
+               $this->assertFalse($result);
+       }
+
+       /**
+        * Tests whether a condition does match the iOS with the correct and more recent 'iOS'
+        *
+        * @test
+        */
+       public function conditionDoesMatchIosWithCorrectSystemKey() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10';
+               $result = $this->matchCondition->match('[system = iOS]');
+               $this->assertTrue($result);
+       }
+
+       /**
+        * Tests whether a condition does match the iOS with the old 'mac'
+        *
+        * @test
+        */
+       public function conditionDoesMatchIosWithOldSystemKey() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7W367a Safari/531.21.10';
+               $result = $this->matchCondition->match('[system = mac]');
+               $this->assertTrue($result);
+       }
+
+       /**
+        * Tests whether a condition does match Windows 2000 with the correct and more recent 'win2k'
+        *
+        * @test
+        */
+       public function conditionDoesMatchWindows2kWithNewSystemKey() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)';
+               $result = $this->matchCondition->match('[system = win2k]');
+               $this->assertTrue($result);
+       }
+
+       /**
+        * Tests whether a condition does match Windows 2000 with the old 'winNT'
+        *
+        * @test
+        */
+       public function conditionDoesMatchWindows2kWithOldSystemKey() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1)';
+               $result = $this->matchCondition->match('[system = winNT]');
+               $this->assertTrue($result);
+       }
+
+       /**
+        * Tests whether a condition does match Windows NT with 'winNT'
+        *
+        * @test
+        */
+       public function conditionDoesMatchWindowsNtWithSystemKey() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)';
+               $result = $this->matchCondition->match('[system = winNT]');
+               $this->assertTrue($result);
+       }
+
+       /**
+        * Tests whether a condition does match Android with the correct and more recent 'android'
+        *
+        * @test
+        */
+       public function conditionDoesMatchAndroidWithNewSystemKey() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
+               $result = $this->matchCondition->match('[system = android]');
+               $this->assertTrue($result);
+       }
+
+       /**
+        * Tests whether a condition does match Android with the old 'linux'
+        *
+        * @test
+        */
+       public function conditionDoesMatchAndroidWithOldSystemKey() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Linux; U; Android 2.3; en-US; sdk Build/GRH55) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1';
+               $result = $this->matchCondition->match('[system = linux]');
+               $this->assertTrue($result);
+       }
+
+       /**
+        * Tests whether a device type condition matches a crawler.
+        *
+        * @test
+        */
+       public function deviceConditionMatchesRobot() {
+               $_SERVER['HTTP_USER_AGENT'] = 'Googlebot/2.1 (+http://www.google.com/bot.html)';
+               $result = $this->matchCondition->match('[device = robot]');
+               $this->assertTrue($result);
+       }
+
+       /**
+        * Tests whether a device type condition does not match a crawler.
+        *
+        * @test
+        */
+       public function deviceConditionDoesNotMatchRobot() {
+               $_SERVER['HTTP_USER_AGENT'] = md5('Some strange user agent');
+               $result = $this->matchCondition->match('[device = robot]');
+               $this->assertFalse($result);
+       }
+
+       /**
+        * Tests whether the language comparison matches.
+        *
+        * @test
+        */
+       public function languageConditionMatchesSingleLanguageExpression() {
+               $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
+               $this->assertTrue($this->matchCondition->match('[language = *de*]'));
+               $this->assertTrue($this->matchCondition->match('[language = *de-de*]'));
+       }
+
+       /**
+        * Tests whether the language comparison matches.
+        *
+        * @test
+        */
+       public function languageConditionMatchesMultipleLanguagesExpression() {
+               $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
+               $this->assertTrue($this->matchCondition->match('[language = *en*,*de*]'));
+               $this->assertTrue($this->matchCondition->match('[language = *en-us*,*de-de*]'));
+       }
+
+       /**
+        * Tests whether the language comparison matches.
+        *
+        * @test
+        */
+       public function languageConditionMatchesCompleteLanguagesExpression() {
+               $this->markTestSkipped('This comparison seems to be incomplete in \TYPO3\CMS\Backend\Configuration\TypoScript\ConditionMatching\ConditionMatcher.');
+               $_SERVER['HTTP_ACCEPT_LANGUAGE'] = 'de-de,de;q=0.8,en-us;q=0.5,en;q=0.3';
+               $this->assertTrue($this->matchCondition->match('[language = de-de,de;q=0.8]'));
+       }
+
+       /**
+        * Tests whether usergroup comparison matches.
+        *
+        * @test
+        */
+       public function usergroupConditionMatchesSingleGroupId() {
+               $GLOBALS['BE_USER']->groupList = '13,14,15';
+               $this->assertTrue($this->matchCondition->match('[usergroup = 13]'));
+       }
+
+       /**
+        * Tests whether usergroup comparison matches.
+        *
+        * @test
+        */
+       public function usergroupConditionMatchesMultipleUserGroupId() {
+               $GLOBALS['BE_USER']->groupList = '13,14,15';
+               $this->assertTrue($this->matchCondition->match('[usergroup = 999,15,14,13]'));
+       }
+
+       /**
+        * Tests whether user comparison matches.
+        *
+        * @test
+        */
+       public function loginUserConditionMatchesAnyLoggedInUser() {
+               $GLOBALS['BE_USER']->user['uid'] = 13;
+               $this->assertTrue($this->matchCondition->match('[loginUser = *]'));
+       }
+
+       /**
+        * Tests whether user comparison matches.
+        *
+        * @test
+        */
+       public function loginUserConditionMatchesSingleLoggedInUser() {
+               $GLOBALS['BE_USER']->user['uid'] = 13;
+               $this->assertTrue($this->matchCondition->match('[loginUser = 13]'));
+       }
+
+       /**
+        * Tests whether user comparison matches.
+        *
+        * @test
+        */
+       public function loginUserConditionDoesNotMatchSingleLoggedInUser() {
+               $GLOBALS['BE_USER']->user['uid'] = 13;
+               $this->assertFalse($this->matchCondition->match('[loginUser = 999]'));
+       }
+
+       /**
+        * Tests whether user comparison matches.
+        *
+        * @test
+        */
+       public function loginUserConditionMatchesMultipleLoggedInUsers() {
+               $GLOBALS['BE_USER']->user['uid'] = 13;
+               $this->assertTrue($this->matchCondition->match('[loginUser = 999,13]'));
+       }
+
+       /**
+        * Tests whether checkinf for an admin user matches
+        *
+        * @test
+        */
+       public function adminUserConditionMatchesAdminUser() {
+               $GLOBALS['BE_USER']->user['uid'] = 13;
+               $GLOBALS['BE_USER']->user['admin'] = 1;
+               $this->assertTrue($this->matchCondition->match('[adminUser = 1]'));
+       }
+
+       /**
+        * Tests whether checkinf for an admin user matches
+        *
+        * @test
+        */
+       public function adminUserConditionMatchesRegularUser() {
+               $GLOBALS['BE_USER']->user['uid'] = 14;
+               $GLOBALS['BE_USER']->user['admin'] = 0;
+               $this->assertTrue($this->matchCondition->match('[adminUser = 0]'));
+       }
+
+       /**
+        * Tests whether checkinf for an admin user matches
+        *
+        * @test
+        */
+       public function adminUserConditionDoesNotMatchRegularUser() {
+               $GLOBALS['BE_USER']->user['uid'] = 14;
+               $GLOBALS['BE_USER']->user['admin'] = 0;
+               $this->assertFalse($this->matchCondition->match('[adminUser = 1]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionMatchesOnEqualExpression() {
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 = 10]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 = 10.1]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 == 10]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 == 10.1]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionMatchesOnEqualExpressionWithMultipleValues() {
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 = 10|20|30]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 = 10.1|20.2|30.3]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 = 10|20|30]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20.2 = 10.1|20.2|30.3]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 == 10|20|30]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 == 10.1|20.2|30.3]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 == 10|20|30]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20.2 == 10.1|20.2|30.3]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionMatchesOnNotEqualExpression() {
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 != 20]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 != 10.2]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionMatchesOnNotEqualExpressionWithMultipleValues() {
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 != 20|30]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 != 10.2|20.3]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionMatchesOnLowerThanExpression() {
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 < 20]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 < 10.2]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionMatchesOnLowerThanOrEqualExpression() {
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 <= 10]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 <= 20]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 <= 10.1]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 <= 10.2]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionMatchesOnGreaterThanExpression() {
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 > 10]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.2 > 10.1]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionMatchesOnGreaterThanOrEqualExpression() {
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10 >= 10]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:20 >= 10]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.1 >= 10.1]'));
+               $this->assertTrue($this->matchCondition->match('[globalVar = LIT:10.2 >= 10.1]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionMatchesOnEmptyExpressionWithNoValueSet() {
+               $testKey = uniqid('test');
+               $this->assertTrue($this->matchCondition->match(('[globalVar = GP:' . $testKey) . '=]'));
+               $this->assertTrue($this->matchCondition->match(('[globalVar = GP:' . $testKey) . ' = ]'));
+       }
+
+       /**
+        * Tests whether numerical comparison matches.
+        *
+        * @test
+        */
+       public function globalVarConditionDoesNotMatchOnEmptyExpressionWithValueSetToZero() {
+               $testKey = uniqid('test');
+               $_GET = array();
+               $_POST = array($testKey => 0);
+               $this->assertFalse($this->matchCondition->match(('[globalVar = GP:' . $testKey) . '=]'));
+               $this->assertFalse($this->matchCondition->match(('[globalVar = GP:' . $testKey) . ' = ]'));
+       }
+
+       /**
+        * Tests whether string comparison matches.
+        *
+        * @test
+        */
+       public function globalStringConditionMatchesOnEqualExpression() {
+               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3.Test.Condition]'));
+               $this->assertFalse($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3]'));
+       }
+
+       /**
+        * Tests whether string comparison matches.
+        *
+        * @test
+        */
+       public function globalStringConditionMatchesWildcardExpression() {
+               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3?Test?Condition]'));
+               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3.T*t.Condition]'));
+               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = TYPO3?T*t?Condition]'));
+       }
+
+       /**
+        * Tests whether string comparison matches.
+        *
+        * @test
+        */
+       public function globalStringConditionMatchesRegularExpression() {
+               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = /^[A-Za-z3.]+$/]'));
+               $this->assertTrue($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = /^TYPO3\\..+Condition$/]'));
+               $this->assertFalse($this->matchCondition->match('[globalString = LIT:TYPO3.Test.Condition = /^FALSE/]'));
+       }
+
+       /**
+        * Tests whether string comparison matches.
+        *
+        * @test
+        */
+       public function globalStringConditionMatchesEmptyRegularExpression() {
+               $testKey = uniqid('test');
+               $_SERVER[$testKey] = '';
+               $this->assertTrue($this->matchCondition->match(('[globalString = _SERVER|' . $testKey) . ' = /^$/]'));
+       }
+
+       /**
+        * Tests whether treeLevel comparison matches.
+        *
+        * @test
+        */
+       public function treeLevelConditionMatchesSingleValue() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->assertTrue($this->matchCondition->match('[treeLevel = 2]'));
+       }
+
+       /**
+        * Tests whether treeLevel comparison matches.
+        *
+        * @test
+        */
+       public function treeLevelConditionMatchesMultipleValues() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->assertTrue($this->matchCondition->match('[treeLevel = 999,998,2]'));
+       }
+
+       /**
+        * Tests whether treeLevel comparison matches.
+        *
+        * @test
+        */
+       public function treeLevelConditionDoesNotMatchFaultyValue() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->assertFalse($this->matchCondition->match('[treeLevel = 999]'));
+       }
+
+       /**
+        * Tests whether treeLevel comparison matches when creating new pages.
+        *
+        * @test
+        */
+       public function treeLevelConditionMatchesCurrentPageIdWhileEditingNewPage() {
+               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array());
+               $GLOBALS['SOBE']->elementsData = array(
+                       array(
+                               'table' => 'pages',
+                               'uid' => 'NEW4adc6021e37e7',
+                               'pid' => 121,
+                               'cmd' => 'new',
+                               'deleteAccess' => 0
+                       )
+               );
+               $GLOBALS['SOBE']->data = array();
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertTrue($this->matchCondition->match('[treeLevel = 3]'));
+       }
+
+       /**
+        * Tests whether treeLevel comparison matches when creating new pages.
+        *
+        * @test
+        */
+       public function treeLevelConditionMatchesCurrentPageIdWhileSavingNewPage() {
+               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array());
+               $GLOBALS['SOBE']->elementsData = array(
+                       array(
+                               'table' => 'pages',
+                               /// 999 is the uid of the page that was just created
+                               'uid' => 999,
+                               'pid' => 121,
+                               'cmd' => 'edit',
+                               'deleteAccess' => 1
+                       )
+               );
+               $GLOBALS['SOBE']->data = array(
+                       'pages' => array(
+                               'NEW4adc6021e37e7' => array(
+                                       'pid' => 121
+                               )
+                       )
+               );
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertTrue($this->matchCondition->match('[treeLevel = 3]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in the previous rootline entries.
+        *
+        * @test
+        */
+       public function PIDupinRootlineConditionMatchesSinglePageIdInRootline() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 111]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in the previous rootline entries.
+        *
+        * @test
+        */
+       public function PIDupinRootlineConditionMatchesMultiplePageIdsInRootline() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 999,111,101]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in the previous rootline entries.
+        *
+        * @test
+        */
+       public function PIDupinRootlineConditionDoesNotMatchPageIdNotInRootline() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertFalse($this->matchCondition->match('[PIDupinRootline = 999]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in the previous rootline entries.
+        *
+        * @test
+        */
+       public function PIDupinRootlineConditionDoesNotMatchLastPageIdInRootline() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertFalse($this->matchCondition->match('[PIDupinRootline = 121]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in the previous rootline entries.
+        *
+        * @test
+        */
+       public function PIDupinRootlineConditionMatchesCurrentPageIdWhileEditingNewPage() {
+               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array());
+               $GLOBALS['SOBE']->elementsData = array(
+                       array(
+                               'table' => 'pages',
+                               'uid' => 'NEW4adc6021e37e7',
+                               'pid' => 121,
+                               'cmd' => 'new',
+                               'deleteAccess' => 0
+                       )
+               );
+               $GLOBALS['SOBE']->data = array();
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 121]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in the previous rootline entries.
+        *
+        * @test
+        */
+       public function PIDupinRootlineConditionMatchesCurrentPageIdWhileSavingNewPage() {
+               $GLOBALS['SOBE'] = $this->getMock('TYPO3\\CMS\\Backend\\Controller\\EditDocumentController', array());
+               $GLOBALS['SOBE']->elementsData = array(
+                       array(
+                               'table' => 'pages',
+                               /// 999 is the uid of the page that was just created
+                               'uid' => 999,
+                               'pid' => 121,
+                               'cmd' => 'edit',
+                               'deleteAccess' => 1
+                       )
+               );
+               $GLOBALS['SOBE']->data = array(
+                       'pages' => array(
+                               'NEW4adc6021e37e7' => array(
+                                       'pid' => 121
+                               )
+                       )
+               );
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertTrue($this->matchCondition->match('[PIDupinRootline = 121]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in all rootline entries.
+        *
+        * @test
+        */
+       public function PIDinRootlineConditionMatchesSinglePageIdInRootline() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertTrue($this->matchCondition->match('[PIDinRootline = 111]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in all rootline entries.
+        *
+        * @test
+        */
+       public function PIDinRootlineConditionMatchesMultiplePageIdsInRootline() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertTrue($this->matchCondition->match('[PIDinRootline = 999,111,101]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in all rootline entries.
+        *
+        * @test
+        */
+       public function PIDinRootlineConditionMatchesLastPageIdInRootline() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertTrue($this->matchCondition->match('[PIDinRootline = 121]'));
+       }
+
+       /**
+        * Tests whether a page Id is found in all rootline entries.
+        *
+        * @test
+        */
+       public function PIDinRootlineConditionDoesNotMatchPageIdNotInRootline() {
+               $this->matchCondition->setRootline($this->rootline);
+               $this->matchCondition->setPageId(121);
+               $this->assertFalse($this->matchCondition->match('[PIDinRootline = 999]'));
+       }
+
+       /**
+        * Tests whether the compatibility version can be evaluated.
+        * (e.g. 4.9 is compatible to 4.0 but not to 5.0)
+        *
+        * @test
+        */
+       public function compatVersionConditionMatchesOlderRelease() {
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] = '4.9';
+               $this->assertTrue($this->matchCondition->match('[compatVersion = 4.0]'));
+       }
+
+       /**
+        * Tests whether the compatibility version can be evaluated.
+        * (e.g. 4.9 is compatible to 4.0 but not to 5.0)
+        *
+        * @test
+        */
+       public function compatVersionConditionMatchesSameRelease() {
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] = '4.9';
+               $this->assertTrue($this->matchCondition->match('[compatVersion = 4.9]'));
+       }
+
+       /**
+        * Tests whether the compatibility version can be evaluated.
+        * (e.g. 4.9 is compatible to 4.0 but not to 5.0)
+        *
+        * @test
+        */
+       public function compatVersionConditionDoesNotMatchNewerRelease() {
+               $GLOBALS['TYPO3_CONF_VARS']['SYS']['compat_version'] = '4.9';
+               $this->assertFalse($this->matchCondition->match('[compatVersion = 5.0]'));
+       }
+
+       /**
+        * Tests whether the generic fetching of variables works with the namespace 'GP'.
+        *
+        * @test
+        */
+       public function genericGetVariablesSucceedsWithNamespaceGP() {
+               $_GET = array('testGet' => 'getTest');
+               $_POST = array('testPost' => 'postTest');
+               $this->assertTrue($this->matchCondition->match('[globalString = GP:testGet = getTest]'));
+               $this->assertTrue($this->matchCondition->match('[globalString = GP:testPost = postTest]'));
+       }
+
+       /**
+        * Tests whether the generic fetching of variables does not work with the namespace 'TSFE',
+        * since we are in the backend context here.
+        *
+        * @test
+        */
+       public function genericGetVariablesFailsWithNamespaceTSFE() {
+               $GLOBALS['TSFE'] = new \stdClass();
+               $GLOBALS['TSFE']->id = 1234567;
+               $this->assertFalse($this->matchCondition->match('[globalString = TSFE:id = 1234567]'));
+       }
+
+       /**
+        * Tests whether the generic fetching of variables works with the namespace 'ENV'.
+        *
+        * @test
+        */
+       public function genericGetVariablesSucceedsWithNamespaceENV() {
+               $testKey = uniqid('test');
+               putenv($testKey . '=testValue');
+               $this->assertTrue($this->matchCondition->match(('[globalString = ENV:' . $testKey) . ' = testValue]'));
+       }
+
+       /**
+        * Tests whether the generic fetching of variables works with the namespace 'IENV'.
+        *
+        * @test
+        */
+       public function genericGetVariablesSucceedsWithNamespaceIENV() {
+               $_SERVER['HTTP_HOST'] = \TYPO3\CMS\Core\Utility\GeneralUtility::getIndpEnv('TYPO3_HOST_ONLY') . ':1234567';
+               $this->assertTrue($this->matchCondition->match('[globalString = IENV:TYPO3_PORT = 1234567]'));
+       }
+
+       /**
+        * Tests whether the generic fetching of variables works with any global namespace.
+        *
+        * @test
+        */
+       public function genericGetVariablesSucceedsWithAnyGlobalNamespace() {
+               $GLOBALS[$this->testGlobalNamespace] = array(
+                       'first' => 'testFirst',
+                       'second' => array('third' => 'testThird')
+               );
+               $this->assertTrue($this->matchCondition->match(('[globalString = ' . $this->testGlobalNamespace) . '|first = testFirst]'));
+               $this->assertTrue($this->matchCondition->match(('[globalString = ' . $this->testGlobalNamespace) . '|second|third = testThird]'));
+       }
+
+       /**
+        * Tests whether determining a pageId works.
+        *
+        * @test
+        */
+       public function pageIdCanBeDeterminedWhileCallingModuleWithPageTree() {
+               $_GET['id'] = 999;
+               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
+               $this->assertEquals(999, $this->matchCondition->getPageId());
+       }
+
+       /**
+        * Tests whether determining a pageId works.
+        *
+        * @test
+        */
+       public function pageIdCanBeDeterminedWhileEditingAPageRecord() {
+               $_GET['edit']['pages'][999] = 'edit';
+               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
+               $this->assertEquals(999, $this->matchCondition->getPageId());
+       }
+
+       /**
+        * Tests whether determining a pageId works.
+        *
+        * @test
+        */
+       public function pageIdCanBeDeterminedWhileEditingARegularRecord() {
+               $this->setUpDatabaseMockForDeterminePageId();
+               $_GET['edit'][$this->testTableName][13] = 'edit';
+               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
+               $this->assertEquals(999, $this->matchCondition->getPageId());
+       }
+
+       /**
+        * Tests whether determining a pageId works.
+        *
+        * @test
+        */
+       public function pageIdCanBeDeterminedWhileCreatingARecord() {
+               $_GET['edit']['pages'][999] = 'new';
+               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
+               $this->assertEquals(999, $this->matchCondition->getPageId());
+       }
+
+       /**
+        * Tests whether determining a pageId works.
+        *
+        * @test
+        */
+       public function pageIdCanBeDeterminedWhileCreatingARecordAfterAnExistingRecord() {
+               $this->setUpDatabaseMockForDeterminePageId();
+               $_GET['edit'][$this->testTableName][-13] = 'new';
+               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
+               $this->assertEquals(999, $this->matchCondition->getPageId());
+       }
+
+       /**
+        * Tests whether determining a pageId works.
+        *
+        * @test
+        */
+       public function pageIdCanBeDeterminedWhileDeletingAPageRecord() {
+               $_GET['cmd']['pages'][999]['delete'] = 1;
+               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
+               $this->assertEquals(999, $this->matchCondition->getPageId());
+       }
+
+       /**
+        * Tests whether determining a pageId works.
+        *
+        * @test
+        */
+       public function pageIdCanBeDeterminedWhileCopyingARecordToAnotherPage() {
+               $_GET['cmd']['pages'][121]['copy'] = 999;
+               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
+               $this->assertEquals(999, $this->matchCondition->getPageId());
+       }
+
+       /**
+        * Tests whether determining a pageId works.
+        *
+        * @test
+        */
+       public function pageIdCanBeDeterminedWhileCopyingARecordAfterAnExistingRecord() {
+               $this->setUpDatabaseMockForDeterminePageId();
+               $_GET['cmd'][$this->testTableName][121]['copy'] = -13;
+               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
+               $this->assertEquals(999, $this->matchCondition->getPageId());
+       }
+
+       /**
+        * Tests whether determining a pageId works.
+        *
+        * @test
+        */
+       public function pageIdCanBeDeterminedWhileMovingARecordToAnotherPage() {
+               $_GET['cmd']['pages'][121]['move'] = 999;
+               $this->matchCondition->match('[globalVar = LIT:10 = 10]');
+               $this->assertEquals(999, $this->matchCondition->getPageId());
+       }
+
+       /**
+        * Callback method for pageIdCanBeDetermined test cases.
+        * Simulates TYPO3_DB->exec_SELECTquery().
+        *
+        * @param       string          $fields
+        * @param       string          $table
+        * @param       string          $where
+        * @return      mixed
+        */
+       public function determinePageIdByRecordDatabaseExecuteCallback($fields, $table, $where) {
+               if ($table === $this->testTableName) {
+                       return array(
+                               'scope' => $this->testTableName,
+                               'data' => array(
+                                       'pid' => 999
+                               )
+                       );
+               } else {
+                       return FALSE;
+               }
+       }
+
+       /**
+        * Callback method for pageIdCanBeDetermined test cases.
+        * Simulates TYPO3_DB->sql_fetch_assoc().
+        *
+        * @param       mixed           $resource
+        * @return      mixed
+        */
+       public function determinePageIdByRecordDatabaseFetchCallback($resource) {
+               if (is_array($resource) && $resource['scope'] === $this->testTableName) {
+                       return $resource['data'];
+               } else {
+                       return FALSE;
+               }
+       }
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/backend/Tests/Unit/Tree/Fixtures/serialized.txt b/typo3/sysext/backend/Tests/Unit/Tree/Fixtures/serialized.txt
new file mode 100644 (file)
index 0000000..f1ab8d7
--- /dev/null
@@ -0,0 +1 @@
+a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";a:11:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:1;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:2;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:3;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:4;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:5;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:5;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:6;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:6;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:7;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:7;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:8;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:8;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}i:9;a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";a:6:{s:18:"serializeClassName";s:41:"TYPO3\CMS\Backend\Tree\TreeNodeCollection";i:0;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:0;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:1;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:1;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:2;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:2;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:3;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:3;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}i:4;a:9:{s:18:"serializeClassName";s:45:"TYPO3\CMS\Backend\Tree\TreeRepresentationNode";s:2:"id";i:4;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";i:9;s:10:"parentNode";a:4:{s:18:"serializeClassName";s:31:"TYPO3\CMS\Backend\Tree\TreeNode";s:2:"id";s:4:"Root";s:10:"parentNode";s:0:"";s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";}s:10:"childNodes";s:0:"";s:5:"label";s:7:"SubTest";s:4:"type";s:4:"Type";s:5:"class";s:5:"Class";s:4:"icon";s:4:"Icon";s:14:"callbackAction";s:15:"Callback Action";}}}}}
diff --git a/typo3/sysext/backend/Tests/Unit/Tree/Pagetree/DataProviderTest.php b/typo3/sysext/backend/Tests/Unit/Tree/Pagetree/DataProviderTest.php
new file mode 100644 (file)
index 0000000..9191123
--- /dev/null
@@ -0,0 +1,126 @@
+<?php
+namespace TYPO3\CMS\Backend\Tests\Unit\Tree\Pagetree;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2012 Stefan Galinski <stefan.galinski@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!
+ ***************************************************************/
+/**
+ * Testcase for class t3lib_tree_pagetree_DataProvider.
+ *
+ * @author Stefan Galinski <stefan.galinski@gmail.com>
+ * @author Oliver Klee <typo3-coding@oliverklee.de>
+ * @package TYPO3
+ * @subpackage t3lib
+ */
+class DataProviderTest extends \tx_phpunit_testcase {
+
+       /**
+        * @var boolean
+        */
+       protected $backupGlobals = TRUE;
+
+       /**
+        * Excludes TYPO3_DB from backup/restore of $GLOBALS because resource types cannot be handled during serializing.
+        *
+        * @var array
+        */
+       protected $backupGlobalsBlacklist = array('TYPO3_DB');
+
+       /**
+        * @var \TYPO3\CMS\Backend\Tree\Pagetree\DataProvider|\PHPUnit_Framework_MockObject_MockObject
+        */
+       protected $fixture = NULL;
+
+       public function setUp() {
+               $GLOBALS['TYPO3_CONF_VARS']['BE']['pageTree']['preloadLimit'] = 0;
+               $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/tree/pagetree/class.t3lib_tree_pagetree_dataprovider.php']['postProcessCollections'] = array();
+               $this->fixture = new \TYPO3\CMS\Backend\Tree\Pagetree\DataProvider();
+       }
+
+       public function tearDown() {
+               unset($this->fixture);
+       }
+
+       /**
+        * @test
+        */
+       public function getRootNodeReturnsNodeWithRootId() {
+               $this->assertSame('root', $this->fixture->getRoot()->getId());
+       }
+
+       /**
+        * @test
+        */
+       public function getRootNodeReturnsExpandedNode() {
+               $this->assertTrue($this->fixture->getRoot()->isExpanded());
+       }
+
+       /**
+        * @test
+        */
+       public function getNodesSetsIsMountPointField() {
+               $subpages = array(
+                       array(
+                               'uid' => 1,
+                               'isMountPoint' => FALSE
+                       ),
+                       array(
+                               'uid' => 2,
+                               'isMountPoint' => TRUE
+                       ),
+                       array(
+                               'uid' => 3
+                       )
+               );
+               $subpagesWithWorkspaceOverlay = array(
+                       array(
+                               'uid' => 1,
+                               'title' => 'Home'
+                       ),
+                       array(
+                               'uid' => 2,
+                               'title' => 'service'
+                       ),
+                       array(
+                               'uid' => 3,
+                               'title' => 'contact'
+                       )
+               );
+               $fixture = $this->getMock('TYPO3\\CMS\\Backend\\Tree\\Pagetree\\DataProvider', array('getSubpages', 'getRecordWithWorkspaceOverlay'));
+               $fixture->expects($this->once())->method('getSubpages')->will($this->returnValue($subpages));
+               $fixture->expects($this->at(1))->method('getRecordWithWorkspaceOverlay')->with(1)->will($this->returnValue($subpagesWithWorkspaceOverlay[0]));
+               $fixture->expects($this->at(2))->method('getRecordWithWorkspaceOverlay')->with(2)->will($this->returnValue($subpagesWithWorkspaceOverlay[1]));
+               $fixture->expects($this->at(3))->method('getRecordWithWorkspaceOverlay')->with(3)->will($this->returnValue($subpagesWithWorkspaceOverlay[2]));
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode();
+               $node->setId(12);
+               $nodeCollection = $fixture->getNodes($node);
+               $isMountPointResult = array();
+               /** @var $node \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
+               foreach ($nodeCollection as $node) {
+                       $isMountPointResult[] = $node->isMountPoint();
+               }
+               $this->assertSame(array(FALSE, TRUE, FALSE), $isMountPointResult);
+       }
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/backend/Tests/Unit/Tree/SortedTreeNodeCollectionTest.php b/typo3/sysext/backend/Tests/Unit/Tree/SortedTreeNodeCollectionTest.php
new file mode 100644 (file)
index 0000000..83e7764
--- /dev/null
@@ -0,0 +1,96 @@
+<?php
+namespace TYPO3\CMS\Backend\Tests\Unit\Tree;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010-2011 Stefan Galinski <stefan.galinski@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!
+ ***************************************************************/
+
+/**
+ * Testcase for class \TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection.
+ *
+ * @author Stefan Galinski <stefan.galinski@gmail.com>
+ * @package TYPO3
+ * @subpackage t3lib
+ */
+class SortedTreeNodeCollectionTest extends \tx_phpunit_testcase {
+
+       protected function createTestCollection() {
+               $nodeCollection = new \TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection();
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 5));
+               $nodeCollection->append($node);
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 15));
+               $nodeCollection->append($node);
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 3));
+               $nodeCollection->append($node);
+               return $nodeCollection;
+       }
+
+       protected function createTestCollectionWithTwoNodes() {
+               $nodeCollection = new \TYPO3\CMS\Backend\Tree\SortedTreeNodeCollection();
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 5));
+               $nodeCollection->append($node);
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 3));
+               $nodeCollection->append($node);
+               return $nodeCollection;
+       }
+
+       /**
+        * @test
+        */
+       public function appendsSorted() {
+               $nodeCollection = $this->createTestCollection();
+               $expected = array(3, 5, 15);
+               $ids = array();
+               foreach ($nodeCollection as $node) {
+                       $ids[] = $node->getId();
+               }
+               $this->assertSame($expected, $ids);
+       }
+
+       /**
+        * @test
+        */
+       public function collectionContainsNode() {
+               $nodeCollection = $this->createTestCollection();
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 5));
+               $this->assertTrue($nodeCollection->contains($node));
+       }
+
+       /**
+        * @test
+        */
+       public function searchDataWithBinarySearch() {
+               $nodeCollection = $this->createTestCollection();
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 15));
+               $this->assertTrue($nodeCollection->contains($node));
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 99));
+               $this->assertFalse($nodeCollection->contains($node));
+               $nodeCollection = $this->createTestCollectionWithTwoNodes();
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 3));
+               $this->assertTrue($nodeCollection->contains($node));
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => 99));
+               $this->assertFalse($nodeCollection->contains($node));
+       }
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/backend/Tests/Unit/Tree/TreeNodeCollectionTest.php b/typo3/sysext/backend/Tests/Unit/Tree/TreeNodeCollectionTest.php
new file mode 100644 (file)
index 0000000..27b8f21
--- /dev/null
@@ -0,0 +1,67 @@
+<?php
+namespace TYPO3\CMS\Backend\Tests\Unit\Tree;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010-2011 Stefan Galinski <stefan.galinski@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!
+ ***************************************************************/
+
+/**
+ * Testcase for class \TYPO3\CMS\Backend\Tree\TreeNodeCollection.
+ *
+ * @author Stefan Galinski <stefan.galinski@gmail.com>
+ * @package TYPO3
+ * @subpackage t3lib
+ */
+class TreeNodeCollectionTest extends \tx_phpunit_testcase {
+
+       public function setUp() {
+
+       }
+
+       public function tearDown() {
+
+       }
+
+       /**
+        * @test
+        */
+       public function sortNodes() {
+               $nodeCollection = new \TYPO3\CMS\Backend\Tree\TreeNodeCollection(array(
+                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 15),
+                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 25),
+                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 5),
+                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 2),
+                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 150),
+                       array('serializeClassName' => 'TYPO3\\CMS\\Backend\\Tree\\TreeNode', 'id' => 67)
+               ));
+               $nodeCollection->asort();
+               $expected = array(2, 5, 15, 25, 67, 150);
+               $ids = array();
+               foreach ($nodeCollection as $node) {
+                       $ids[] = $node->getId();
+               }
+               $this->assertSame($expected, $ids);
+       }
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/backend/Tests/Unit/Tree/TreeNodeTest.php b/typo3/sysext/backend/Tests/Unit/Tree/TreeNodeTest.php
new file mode 100644 (file)
index 0000000..14ef87f
--- /dev/null
@@ -0,0 +1,117 @@
+<?php
+namespace TYPO3\CMS\Backend\Tests\Unit\Tree;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2010-2011 Stefan Galinski <stefan.galinski@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!
+ ***************************************************************/
+
+/**
+ * Testcase for class \TYPO3\CMS\Backend\Tree\TreeNode.
+ *
+ * @author Stefan Galinski <stefan.galinski@gmail.com>
+ * @package TYPO3
+ * @subpackage t3lib
+ */
+class TreeNodeTest extends \tx_phpunit_testcase {
+
+       //////////////////////
+       // Utility functions
+       //////////////////////
+       /**
+        * Returns the absolute fixtures path for this testcase.
+        *
+        * @return string the absolute fixtures path for this testcase, will not be empty
+        */
+       private function determineFixturesPath() {
+                       // We have to take the whole relative path as otherwise this test fails on Windows systems
+               return PATH_site . 'typo3/sysext/backend/Tests/Unit/Tree/Fixtures/';
+       }
+
+       protected function setUpNodeTestData() {
+               $fixture = new \TYPO3\CMS\Backend\Tree\TreeNode();
+               $fixture->setId('Root');
+               $nodeCollection = new \TYPO3\CMS\Backend\Tree\TreeNodeCollection();
+               for ($i = 0; $i < 10; ++$i) {
+                       $node = new \TYPO3\CMS\Backend\Tree\TreeNode();
+                       $node->setId($i);
+                       $node->setParentNode($fixture);
+                       $subNodeCollection = new \TYPO3\CMS\Backend\Tree\TreeNodeCollection();
+                       for ($j = 0; $j < 5; ++$j) {
+                               $subNode = new \TYPO3\CMS\Backend\Tree\TreeRepresentationNode();
+                               $subNode->setId($j);
+                               $subNode->setLabel('SubTest');
+                               $subNode->setType('Type');
+                               $subNode->setClass('Class');
+                               $subNode->setIcon('Icon');
+                               $subNode->setCallbackAction('Callback Action');
+                               $subNode->setParentNode($node);
+                               $subNodeCollection->append($subNode);
+                       }
+                       $node->setChildNodes($subNodeCollection);
+                       $nodeCollection->append($node);
+               }
+               $fixture->setChildNodes($nodeCollection);
+               return $fixture;
+       }
+
+       ///////////////
+       // Test cases
+       ///////////////
+       /**
+        * @test
+        */
+       public function serializeFixture() {
+               $expected = trim(file_get_contents($this->determineFixturesPath() . 'serialized.txt'));
+               $fixture = $this->setUpNodeTestData();
+               $serializedString = trim($fixture->serialize());
+               $this->assertSame($expected, $serializedString);
+       }
+
+       /**
+        * @test
+        */
+       public function deserializeFixture() {
+               $source = trim(file_get_contents($this->determineFixturesPath() . 'serialized.txt'));
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode();
+               $node->unserialize($source);
+               $serializedString = $node->serialize();
+               $this->assertSame($source, $serializedString);
+       }
+
+       /**
+        * @test
+        */
+       public function compareNodes() {
+               $node = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => '15'));
+               $otherNode = new \TYPO3\CMS\Backend\Tree\TreeNode(array('id' => '5'));
+               $compareResult = $node->compareTo($otherNode);
+               $otherNode->setId('25');
+               $compareResult = $node->compareTo($otherNode);
+               $this->assertSame(-1, $compareResult);
+               $otherNode->setId('15');
+               $compareResult = $node->compareTo($otherNode);
+               $this->assertSame(0, $compareResult);
+       }
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/core/Tests/Unit/Mail/MailerTest.php b/typo3/sysext/core/Tests/Unit/Mail/MailerTest.php
new file mode 100644 (file)
index 0000000..c2358e3
--- /dev/null
@@ -0,0 +1,120 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Unit\Mail;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2011 Ernesto Baschny (ernst@cron-it.de)
+ * 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!
+ ***************************************************************/
+
+/**
+ * Testcase for the TYPO3\CMS\Core\Mail\Mailer class.
+ *
+ * @package TYPO3
+ * @subpackage t3lib
+ * @author Helmut Hummel <helmut.hummel@typo3.org>
+ */
+class MailerTest extends \tx_phpunit_testcase {
+
+       /**
+        * @var \TYPO3\CMS\Core\Mail\Mailer
+        */
+       protected $fixture;
+
+       /**
+        * @var array
+        */
+       protected $globalMailSettings;
+
+       public function setUp() {
+               $this->globalMailSettings = $GLOBALS['TYPO3_CONF_VARS']['MAIL'];
+               $this->fixture = $this->getMock('TYPO3\\CMS\\Core\\Mail\\Mailer', array('noMethodMocked'), array(), '', FALSE);
+       }
+
+       public function tearDown() {
+               unset($this->fixture);
+               $GLOBALS['TYPO3_CONF_VARS']['MAIL'] = $this->globalMailSettings;
+       }
+
+       //////////////////////////
+       // Tests concerning t3lib_mail_Mailer
+       //////////////////////////
+       /**
+        * @test
+        */
+       public function injectedSettingsAreNotReplacedByGlobalSettings() {
+               $settings = array('transport' => 'mbox', 'transport_mbox_file' => '/path/to/file');
+               $GLOBALS['TYPO3_CONF_VARS']['MAIL'] = array('transport' => 'sendmail', 'transport_sendmail_command' => 'sendmail');
+               $this->fixture->injectMailSettings($settings);
+               $this->fixture->__construct();
+               $this->assertAttributeSame($settings, 'mailSettings', $this->fixture);
+       }
+
+       /**
+        * @test
+        */
+       public function globalSettingsAreUsedIfNoSettingsAreInjected() {
+               $settings = ($GLOBALS['TYPO3_CONF_VARS']['MAIL'] = array('transport' => 'sendmail', 'transport_sendmail_command' => 'sendmail'));
+               $this->fixture->__construct();
+               $this->assertAttributeSame($settings, 'mailSettings', $this->fixture);
+       }
+
+       /**
+        * Data provider for wrongConfigigurationThrowsException
+        *
+        * @return array Data sets
+        */
+       static public function wrongConfigigurationProvider() {
+               return array(
+                       'smtp but no host' => array(array('transport' => 'smtp')),
+                       'sendmail but no command' => array(array('transport' => 'sendmail')),
+                       'mbox but no file' => array(array('transport' => 'mbox')),
+                       'no instance of Swift_Transport' => array(array('transport' => 'TYPO3\\CMS\\Core\\Messaging\\ErrorpageMessage'))
+               );
+       }
+
+       /**
+        * @test
+        * @param $settings
+        * @dataProvider wrongConfigigurationProvider
+        * @expectedException \TYPO3\CMS\Core\Exception
+        */
+       public function wrongConfigigurationThrowsException($settings) {
+               $this->fixture->injectMailSettings($settings);
+               $this->fixture->__construct();
+       }
+
+       /**
+        * @test
+        */
+       public function providingCorrectClassnameDoesNotThrowException() {
+               if (!class_exists('t3lib_mail_SwiftMailerFakeTransport')) {
+                               // Create fake custom transport class
+                       eval('class t3lib_mail_SwiftMailerFakeTransport extends \\TYPO3\\CMS\\Core\\Mail\\MboxTransport {
+                               public function __construct($settings) {}
+                       }');
+               }
+               $this->fixture->injectMailSettings(array('transport' => 't3lib_mail_SwiftMailerFakeTransport'));
+               $this->fixture->__construct();
+       }
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/core/Tests/Unit/Mail/SwiftMailerAdapterTest.php b/typo3/sysext/core/Tests/Unit/Mail/SwiftMailerAdapterTest.php
new file mode 100644 (file)
index 0000000..64d1004
--- /dev/null
@@ -0,0 +1,86 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Unit\Mail;
+
+/***************************************************************
+ * Copyright notice
+ *
+ * (c) 2011 Ernesto Baschny (ernst@cron-it.de)
+ * 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!
+ ***************************************************************/
+
+/**
+ * Testcase for the \TYPO3\CMS\Core\Mail\SwiftMailerAdapter class.
+ *
+ * @package TYPO3
+ * @subpackage t3lib
+ * @author Ernesto Baschny <ernst@cron-it.de>
+ */
+class SwiftMailerAdapterTest extends \tx_phpunit_testcase {
+
+       /**
+        * @var \TYPO3\CMS\Core\Mail\SwiftMailerAdapter
+        */
+       protected $fixture;
+
+       public function setUp() {
+               $this->fixture = $this->getAccessibleMock('\\TYPO3\\CMS\\Core\\Mail\\SwiftMailerAdapter', array('dummy'));
+       }
+
+       public function tearDown() {
+
+       }
+
+       //////////////////////////
+       // Tests concerning mail
+       //////////////////////////
+       /**
+        * Data provider for parseAddressesTest
+        *
+        * @return array Data sets
+        */
+       static public function parseAddressesProvider() {
+               return array(
+                       'name &ltemail&gt;' => array('name <email@example.org>', array('email@example.org' => 'name')),
+                       '&lt;email&gt;' => array('<email@example.org>', array('email@example.org')),
+                       'email' => array('email@example.org', array('email@example.org')),
+                       'email1,email2' => array('email1@example.org,email2@example.com', array('email1@example.org', 'email2@example.com')),
+                       'name &ltemail&gt;,email2' => array('name <email1@example.org>,email2@example.com', array('email1@example.org' => 'name', 'email2@example.com')),
+                       '"last, first" &lt;name@example.org&gt;' => array('"last, first" <email@example.org>', array('email@example.org' => '"last, first"')),
+                       'email,name &ltemail&gt;,"last, first" &lt;name@example.org&gt;' => array(
+                               'email1@example.org, name <email2@example.org>, "last, first" <email3@example.org>',
+                               array(
+                                       'email1@example.org',
+                                       'email2@example.org' => 'name',
+                                       'email3@example.org' => '"last, first"'
+                               )
+                       )
+               );
+       }
+
+       /**
+        * @test
+        * @dataProvider parseAddressesProvider
+        */
+       public function parseAddressesTest($source, $addressList) {
+               $this->assertEquals($addressList, $this->fixture->_callRef('parseAddresses', $source));
+       }
+
+}
+
+?>
\ No newline at end of file
diff --git a/typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php b/typo3/sysext/core/Tests/Unit/Utility/ArrayUtilityTest.php
new file mode 100644 (file)
index 0000000..13c9c9e
--- /dev/null
@@ -0,0 +1,878 @@
+<?php
+namespace TYPO3\CMS\Core\Tests\Unit\Utility;
+
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 2011 Susanne Moog <typo3@susanne-moog.de>
+ *  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!
+ ***************************************************************/
+
+/**
+ * Testcase for class \TYPO3\CMS\Core\Utility\ArrayUtility
+ *
+ * @author Susanne Moog <typo3@susanne-moog.de>
+ * @author Christian Kuhn <lolli@schwarzbu.ch>
+ * @package TYPO3
+ * @subpackage t3lib
+ */
+class ArrayUtilityTest extends \tx_phpunit_testcase {
+
+       ///////////////////////
+       // Tests concerning filterByValueRecursive
+       ///////////////////////
+       /**
+        * Data provider for filterByValueRecursiveCorrectlyFiltersArray
+        *
+        * Every array splits into:
+        * - String value to search for
+        * - Input array
+        * - Expected result array
+        */
+       public function filterByValueRecursive() {
+               return array(
+                       'empty search array' => array(
+                               'banana',
+                               array(),
+                               array()
+                       ),
+                       'empty string as needle' => array(
+                               '',
+                               array(
+                                       '',
+                                       'apple'
+                               ),
+                               array(
+                                       ''
+                               )
+                       ),
+                       'flat array searching for string' => array(
+                               'banana',
+                               array(
+                                       'apple',
+                                       'banana'
+                               ),
+                               array(
+                                       1 => 'banana'
+                               )
+                       ),
+                       'flat array searching for string with two matches' => array(
+                               'banana',
+                               array(
+                                       'foo' => 'apple',
+                                       'firstbanana' => 'banana',
+                                       'secondbanana' => 'banana'
+                               ),
+                               array(
+                                       'firstbanana' => 'banana',
+                                       'secondbanana' => 'banana'
+                               )
+                       ),
+                       'multi dimensional array searching for string with multiple matches' => array(
+                               'banana',
+                               array(
+                                       'foo' => 'apple',
+                                       'firstbanana' => 'banana',
+                                       'grape' => array(
+                                               'foo2' => 'apple2',
+                                               'secondbanana' => 'banana',
+                                               'foo3' => array()
+                                       ),
+                                       'bar' => 'orange'
+                               ),
+                               array(
+                                       'firstbanana' => 'banana',
+                                       'grape' => array(
+                                               'secondbanana' => 'banana'
+                                       )
+                               )
+                       ),
+                       'multi dimensional array searching for integer with multiple matches' => array(
+                               42,
+                               array(
+                                       'foo' => 23,
+                                       'bar' => 42,
+                                       array(
+                                               'foo' => 23,
+                                               'bar' => 42
+                                       )
+                               ),
+                               array(
+                                       'bar' => 42,
+                                       array(
+                                               'bar' => 42
+                                       )
+                               )
+                       ),
+                       'flat array searching for boolean TRUE' => array(
+                               TRUE,
+                               array(
+                                       23 => FALSE,
+                                       42 => TRUE
+                               ),
+                               array(
+                                       42 => TRUE
+                               )
+                       ),
+                       'multi dimensional array searching for boolean FALSE' => array(
+                               FALSE,
+                               array(
+                                       23 => FALSE,
+                                       42 => TRUE,
+                                       'foo' => array(
+                                               23 => FALSE,
+                                               42 => TRUE
+                                       )
+                               ),
+                               array(
+                                       23 => FALSE,
+                                       'foo' => array(
+                                               23 => FALSE
+                                       )
+                               )
+                       ),
+                       'flat array searching for array' => array(
+                               array(
+                                       'foo' => 'bar'
+                               ),
+                               array(
+                                       'foo' => 'bar',
+                                       'foobar' => array(
+                                               'foo' => 'bar'
+                                       )
+                               ),
+                               array(
+                                       'foobar' => array(
+                                               'foo' => 'bar'
+                                       )
+                               )
+                       )
+               );
+       }
+
+       /**
+        * @test
+        * @dataProvider filterByValueRecursive
+        */
+       public function filterByValueRecursiveCorrectlyFiltersArray($needle, $haystack, $expectedResult) {
+               $this->assertEquals(
+                       $expectedResult,
+                       \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive($needle, $haystack)
+               );
+       }
+
+       /**
+        * @test
+        */
+       public function filterByValueRecursiveMatchesReferencesToSameObject() {
+               $instance = new \stdClass();
+               $this->assertEquals(
+                       array($instance),
+                       \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive($instance, array($instance))
+               );
+       }
+
+       /**
+        * @test
+        */
+       public function filterByValueRecursiveDoesNotMatchDifferentInstancesOfSameClass() {
+               $this->assertEquals(
+                       array(),
+                       \TYPO3\CMS\Core\Utility\ArrayUtility::filterByValueRecursive(new \stdClass(), array(new \stdClass()))
+               );
+       }
+
+       ///////////////////////
+       // Tests concerning isValidPath
+       ///////////////////////
+       /**
+        * Mock the class under test, isValidPath() (method under test), calls
+        * static getValuePath() internally, which is mocked here to return a specific
+        * result. This works because of 'static' keyword'  instead of 'self'
+        * for getValueByPath() call, using late static binding in PHP 5.3
+        *
+        * @test
+        */
+       public function isValidPathReturnsTrueIfPathExists() {
+               $namespace = 'TYPO3\\CMS\\Core\\Utility';
+               $className = uniqid('ArrayUtility');
+               eval(
+                       'namespace ' . $namespace . ';' .
+                       'class ' . $className . ' extends \\TYPO3\\CMS\\Core\\Utility\\ArrayUtility {' .
+                       '  public static function getValueByPath() {' .
+                       '    return 42;' .
+                       '  }' .
+                       '}'
+               );
+               $className = $namespace . '\\' . $className;
+               $this->assertTrue($className::isValidPath(array('foo'), 'foo'));
+       }
+
+       /**
+        * @test
+        */
+       public function isValidPathReturnsFalseIfPathDoesNotExist() {
+               $namespace = 'TYPO3\\CMS\\Core\\Utility';
+               $className = uniqid('ArrayUtility');
+               eval(
+                       'namespace ' . $namespace . ';' .
+                       'class ' . $className . ' extends \\TYPO3\\CMS\\Core\\Utility\\ArrayUtility {' .
+                       '  public static function getValueByPath() {' .
+                       '    throw new \RuntimeException(\'foo\', 123);' .
+                       '  }' .
+                       '}'
+               );
+               $className = $namespace . '\\' . $className;
+               $this->assertFalse($className::isValidPath(array('foo'), 'foo'));
+       }
+
+       ///////////////////////
+       // Tests concerning getValueByPath
+       ///////////////////////
+       /**
+        * @test
+        * @expectedException RuntimeException
+        */
+       public function getValueByPathThrowsExceptionIfPathIsEmpty() {
+               \TYPO3\CMS\Core\Utility\ArrayUtility::getValueByPath(array(), '');
+       }
+
+       /**
+        * Data provider for getValueByPathThrowsExceptionIfPathNotExists
+        * Every array splits into:
+        * - Array to get value from
+        * - String path
+        * - Expected result
+        */
+       public function getValueByPathInvalidPathDataProvider() {
+               return array(
+                       'not existing path 1' => array(
+                               array(
+                                       'foo' => array()
+                               ),
+                               'foo/bar/baz',
+                               FALSE
+                       ),
+                       'not existing path 2' => array(
+                               array(
+                                       'foo' => array(
+                                               'baz' => 42
+                                       ),
+                                       'bar' => array()
+                               ),
+                               'foo/bar/baz',
+                               FALSE
+                       ),
+                       // Negative test: This could be improved and the test moved to
+                       // the valid data provider if the method supports this
+                       'doubletick encapsulated quoted doubletick does not work' => array(
+                               array(
+                                       '"foo"bar"' => array(
+                                               'baz' => 42
+                                       ),
+                                       'bar' => array()
+                               ),
+                               '"foo\\"bar"/baz',
+                               42
+                       ),
+                       // Negative test: Method could be improved here
+                       'path with doubletick does not work' => array(
+                               array(
+                                       'fo"o' => array(
+                                               'bar' => 42
+                                       )