Extbase:
authorJochen Rau <j.rau@web.de>
Tue, 19 May 2009 08:15:39 +0000 (08:15 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 19 May 2009 08:15:39 +0000 (08:15 +0000)
* Fixed wrong class name of Tx_Extbase_Utility_Plugin_testcase (not mission critical)

typo3/sysext/extbase/Classes/Utility/Plugin.php
typo3/sysext/extbase/Tests/Utility/Plugin_testcase.php

index fb22351..eeb0056 100644 (file)
@@ -56,7 +56,7 @@ class Tx_Extbase_Utility_Plugin {
                        throw new InvalidArgumentException('The plugin name must not be empty', 1239891987);
                }
                if (empty($extensionName) || preg_match('/[A-Z][A-Za-z0-9]/', $extensionName) === 0) {
                        throw new InvalidArgumentException('The plugin name must not be empty', 1239891987);
                }
                if (empty($extensionName) || preg_match('/[A-Z][A-Za-z0-9]/', $extensionName) === 0) {
-                       throw new InvalidArgumentException('The extension name was invalid (must not be empty and must match /[A-Z]][A-Za-z0-9]/)', 1239891989);
+                       throw new InvalidArgumentException('The extension name was invalid (must not be empty and must match /[A-Z][A-Za-z0-9]/)', 1239891989);
                }
                $pluginSignature = strtolower($extensionName) . '_' . strtolower($pluginName);
 
                }
                $pluginSignature = strtolower($extensionName) . '_' . strtolower($pluginName);
 
index 3197020..f6a9595 100644 (file)
 
 
 /**
 
 
 /**
- * Testcase for class t3lib_extMgm
+ * Testcase for class Tx_Extbase_Utility_Plugin
  *
  *
- * @author     Oliver Hader <oliver@typo3.org>
- * @package TYPO3
- * @subpackage t3lib
+ * @package Extbase
+ * @subpackage extbase
  */
  */
-class t3lib_extmgm_testcase extends tx_phpunit_testcase {
+class Tx_Extbase_Utility_Plugin_testcase extends tx_phpunit_testcase {
        
        /**
        
        /**
-        * Contains backup of defined GLOBALS
-        * @var array
-        */
-       protected $globals = array();
-
-       /**
         * Contains backup of $TYPO3_CONF_VARS
         * @var array
         */
         * Contains backup of $TYPO3_CONF_VARS
         * @var array
         */
@@ -47,42 +40,13 @@ class t3lib_extmgm_testcase extends tx_phpunit_testcase {
        public function setUp() {
                global $TYPO3_CONF_VARS;
                $this->typo3ConfVars = $TYPO3_CONF_VARS;
        public function setUp() {
                global $TYPO3_CONF_VARS;
                $this->typo3ConfVars = $TYPO3_CONF_VARS;
-               $this->globals = array(
-                       'TYPO3_LOADED_EXT' => serialize($GLOBALS['TYPO3_LOADED_EXT']),
-               );
        }
        
        public function tearDown() {
                global $TYPO3_CONF_VARS;
                $TYPO3_CONF_VARS = $this->typo3ConfVars;
        }
        
        public function tearDown() {
                global $TYPO3_CONF_VARS;
                $TYPO3_CONF_VARS = $this->typo3ConfVars;
-               foreach ($this->globals as $key => $value) {
-                       $GLOBALS[$key] = unserialize($value);
-               }
-       }
-       
-       /**
-        * @test
-        * @see t3lib_extMgm::getExtensionKeyByPrefix
-        */
-       public function checkGetExtensionKeyByPrefix() {
-               $uniqueSuffix = uniqid('test');
-               $GLOBALS['TYPO3_LOADED_EXT']['tt_news' . $uniqueSuffix] = array();
-               $GLOBALS['TYPO3_LOADED_EXT']['kickstarter' . $uniqueSuffix] = array();
-
-               $this->assertEquals(
-                       'tt_news' . $uniqueSuffix,
-                       t3lib_extMgm::getExtensionKeyByPrefix('tx_ttnews' . $uniqueSuffix)
-               );
-               $this->assertEquals(
-                       'kickstarter' . $uniqueSuffix,
-                       t3lib_extMgm::getExtensionKeyByPrefix('tx_kickstarter' . $uniqueSuffix)
-               );
-               $this->assertFalse(
-                       t3lib_extMgm::getExtensionKeyByPrefix('tx_unloadedextension' . $uniqueSuffix)
-               );
        }
        
        }
        
-
        /**
         * @test
         * @see Tx_Extbase_Utility_Plugin::registerPlugin
        /**
         * @test
         * @see Tx_Extbase_Utility_Plugin::registerPlugin