Element -> Components for the different classes.
authorGunnar Wrobel <p@rdus.de>
Mon, 6 Sep 2010 06:38:58 +0000 (08:38 +0200)
committerGunnar Wrobel <p@rdus.de>
Mon, 6 Sep 2010 10:46:58 +0000 (12:46 +0200)
21 files changed:
components/lib/Components.php
components/lib/Components/Config.php
components/lib/Components/Config/Cli.php
components/lib/Components/Configs.php
components/lib/Components/Constants.php
components/lib/Components/Exception.php
components/lib/Components/Module.php
components/lib/Components/Module/CiSetup.php
components/lib/Components/Module/DevPackage.php
components/lib/Components/Module/Installer.php
components/lib/Components/Module/PearPackageXml.php
components/lib/Components/Modules.php
components/package.xml
components/script/horde-components.php
components/test/Components/AllTests.php
components/test/Components/Autoload.php
components/test/Components/Integration/ComponentsTest.php [new file with mode: 0644]
components/test/Components/Integration/ElementTest.php [deleted file]
components/test/Components/StoryTestCase.php
components/test/Components/Stub/Parser.php
components/test/Components/fixture/simple/package.xml

index 70816d7..e96b5b2 100644 (file)
@@ -1,20 +1,20 @@
 <?php
 /**
- * The Horde_Element:: class is the entry point for the various Horde
- * element actions provided by the package.
+ * The Components:: class is the entry point for the various component actions
+ * provided by the package.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * The Horde_Element:: class is the entry point for the various Horde
- * element actions provided by the package.
+ * The Components:: class is the entry point for the various component actions
+ * provided by the package.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  *
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element
+class Components
 {
     /**
      * The main entry point for the application.
@@ -47,7 +47,7 @@ class Horde_Element
         $config->handleModules($modules);
         try {
             self::_validateArguments($config);
-        } catch (Horde_Element_Exception $e) {
+        } catch (Components_Exception $e) {
             $parser->parserError($e->getMessage());
             return;
         }
@@ -72,9 +72,9 @@ class Horde_Element
 
     static private function _prepareConfig(Horde_Argv_Parser $parser)
     {
-        $config = new Horde_Element_Configs();
+        $config = new Components_Configs();
         $config->addConfigurationType(
-            new Horde_Element_Config_Cli(
+            new Components_Config_Cli(
                 $parser
             )
         );
@@ -83,24 +83,24 @@ class Horde_Element
 
     static private function _prepareModules()
     {
-        $modules = new Horde_Element_Modules();
-        $modules->addModulesFromDirectory(dirname(__FILE__) . '/Element/Module');
+        $modules = new Components_Modules();
+        $modules->addModulesFromDirectory(dirname(__FILE__) . '/Components/Module');
         return $modules;
     }
 
-    static private function _validateArguments(Horde_Element_Config $config)
+    static private function _validateArguments(Components_Config $config)
     {
         $arguments = $config->getArguments();
         if (empty($arguments[0])) {
-            throw new Horde_Element_Exception('Please specify the path of the PEAR package!');
+            throw new Components_Exception('Please specify the path of the PEAR package!');
         }
 
         if (!is_dir($arguments[0])) {
-            throw new Horde_Element_Exception(sprintf('%s specifies no directory!', $arguments[0]));
+            throw new Components_Exception(sprintf('%s specifies no directory!', $arguments[0]));
         }
 
         if (!file_exists($arguments[0] . '/package.xml')) {
-            throw new Horde_Element_Exception(sprintf('There is no package.xml at %s!', $arguments[0]));
+            throw new Components_Exception(sprintf('There is no package.xml at %s!', $arguments[0]));
         }
     }
 }
\ No newline at end of file
index da22e46..02c9dcf 100644 (file)
@@ -1,19 +1,19 @@
 <?php
 /**
- * Horde_Element_Config:: interface represents a configuration type for the Horde
+ * Components_Config:: interface represents a configuration type for the Horde
  * element tool.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * Horde_Element_Config:: interface represents a configuration type for the Horde
+ * Components_Config:: interface represents a configuration type for the Horde
  * element tool.
  *
  * Copyright 2009-2010 The Horde Project (http://www.horde.org/)
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-interface Horde_Element_Config
+interface Components_Config
 {
     /**
      * Provide each configuration handler with the list of supported modules.
      *
-     * @param Horde_Element_Modules $modules A list of modules.
+     * @param Components_Modules $modules A list of modules.
      * @return NULL
      */
-    public function handleModules(Horde_Element_Modules $modules);
+    public function handleModules(Components_Modules $modules);
 
     /**
      * Return the options provided by the configuration handlers.
index 6f63f94..e5bec10 100644 (file)
@@ -1,19 +1,19 @@
 <?php
 /**
- * Horde_Element_Config_Cli:: class provides the command line interface for the Horde
+ * Components_Config_Cli:: class provides the command line interface for the Horde
  * element tool.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * Horde_Element_Config_Cli:: class provides the command line interface for the Horde
+ * Components_Config_Cli:: class provides the command line interface for the Horde
  * element tool.
  *
  * Copyright 2009-2010 The Horde Project (http://www.horde.org/)
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_Config_Cli
-implements Horde_Element_Config
+class Components_Config_Cli
+implements Components_Config
 {
     /**
      * The command line argument parser.
@@ -64,10 +64,10 @@ implements Horde_Element_Config
     /**
      * Load the options for the list of supported modules.
      *
-     * @param Horde_Element_Modules $modules A list of modules.
+     * @param Components_Modules $modules A list of modules.
      * @return NULL
      */
-    public function handleModules(Horde_Element_Modules $modules)
+    public function handleModules(Components_Modules $modules)
     {
         foreach ($modules as $module) {
             $this->_addOptionsFromModule($this->_parser, $module);
@@ -100,7 +100,7 @@ implements Horde_Element_Config
      * Add an option group from the provided module to the parser.
      *
      * @param Horde_Argv_Parser $parser The parser.
-     * @param Horde_Element_Module   $module The module providing the option group.
+     * @param Components_Module   $module The module providing the option group.
      *
      * @return NULL
      */
index ee5a072..c66d84f 100644 (file)
@@ -1,19 +1,19 @@
 <?php
 /**
- * Horde_Element_Configs:: class represents configuration for the
+ * Components_Configs:: class represents configuration for the
  * Horde element tool.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * Horde_Element_Configs:: class represents configuration for the
+ * Components_Configs:: class represents configuration for the
  * Horde element tool.
  *
  * Copyright 2009-2010 The Horde Project (http://www.horde.org/)
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_Configs
-implements Horde_Element_Config
+class Components_Configs
+implements Components_Config
 {
 
     /**
@@ -48,21 +48,21 @@ implements Horde_Element_Config
     /**
      * Add a configuration type to the configuration handler.
      *
-     * @param Horde_Element_Config $type The configuration type.
+     * @param Components_Config $type The configuration type.
      *
      * @return NULL
      */
-    public function addConfigurationType(Horde_Element_Config $type) {
+    public function addConfigurationType(Components_Config $type) {
         $this->_configs[] = $type;
     }
 
     /**
      * Provide each configuration handler with the list of supported modules.
      *
-     * @param Horde_Element_Modules $modules A list of modules.
+     * @param Components_Modules $modules A list of modules.
      * @return NULL
      */
-    public function handleModules(Horde_Element_Modules $modules)
+    public function handleModules(Components_Modules $modules)
     {
         foreach ($this->_configs as $config) {
             $config->handleModules($modules);
index 42f8e9f..9cad1dc 100644 (file)
@@ -1,18 +1,18 @@
 <?php
 /**
- * Horde_Element_Constants:: provides the constants for this package.
+ * Components_Constants:: provides the constants for this package.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * Horde_Element_Constants:: provides the constants for this package.
+ * Components_Constants:: provides the constants for this package.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  *
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_Constants
+class Components_Constants
 {
     const DATA_DIR = '@data_dir@';
 
@@ -37,6 +37,6 @@ class Horde_Element_Constants
                 array(dirname(__FILE__), '..', '..', '..', 'data')
             );
         }
-        return self::DATA_DIR . DIRECTORY_SEPARATOR . 'Element';
+        return self::DATA_DIR . DIRECTORY_SEPARATOR . 'Components';
     }
 }
index 115b70a..f0a1043 100644 (file)
@@ -1,18 +1,20 @@
 <?php
 /**
- * This class provides the standard error class for the Element package.
+ * This class provides the standard error class for the Components
+ * package.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * This class provides the standard error class for the Element package.
+ * This class provides the standard error class for the Components
+ * package.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  *
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_Exception
+class Components_Exception
 extends Exception
 {
 }
index 43a9862..b9ab728 100644 (file)
@@ -1,18 +1,18 @@
 <?php
 /**
- * Horde_Element_Module:: represents a task for a Horde element.
+ * Components_Module:: represents a task for a Horde component.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * Horde_Element_Module:: represents a task for a Horde element.
+ * Components_Module:: represents a task for a Horde component.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  *
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-interface Horde_Element_Module
+interface Components_Module
 {
     public function getOptionGroupTitle();
 
@@ -33,7 +33,7 @@ interface Horde_Element_Module
 
     public function getOptionGroupOptions();
 
-    public function handle(Horde_Element_Config $config);
+    public function handle(Components_Config $config);
 
-    public function run(Horde_Element_Config $config);
+    public function run(Components_Config $config);
 }
\ No newline at end of file
index 7860466..e27d375 100644 (file)
@@ -1,19 +1,19 @@
 <?php
 /**
- * Horde_Element_Module_CiSetup:: generates the configuration for Hudson based
+ * Components_Module_CiSetup:: generates the configuration for Hudson based
  * continuous integration of a Horde PEAR package.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * Horde_Element_Module_CiSetup:: generates the configuration for Hudson based
+ * Components_Module_CiSetup:: generates the configuration for Hudson based
  * continuous integration of a Horde PEAR package.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_Module_CiSetup
-implements Horde_Element_Module
+class Components_Module_CiSetup
+implements Components_Module
 {
     public function getOptionGroupTitle()
     {
@@ -70,7 +70,7 @@ implements Horde_Element_Module
         );
     }
 
-    public function handle(Horde_Element_Config $config)
+    public function handle(Components_Config $config)
     {
         $options = $config->getOptions();
         if (!empty($options['cisetup']) | !empty($options['ciprebuild'])) {
@@ -78,7 +78,7 @@ implements Horde_Element_Module
         }
     }
 
-    public function run(Horde_Element_Config $config)
+    public function run(Components_Config $config)
     {
         $options = $config->getOptions();
 
@@ -105,8 +105,8 @@ implements Horde_Element_Module
 
         if (!empty($options['cisetup'])) {
             $in = file_get_contents(
-                Horde_Element_Constants::getDataDirectory()
-                . DIRECTORY_SEPARATOR . 'hudson-element-config.xml.template',
+                Components_Constants::getDataDirectory()
+                . DIRECTORY_SEPARATOR . 'hudson-component-config.xml.template',
                 'r'
             );
             file_put_contents(
@@ -117,8 +117,8 @@ implements Horde_Element_Module
 
         if (!empty($options['ciprebuild'])) {
             $in = file_get_contents(
-                Horde_Element_Constants::getDataDirectory()
-                . DIRECTORY_SEPARATOR . 'hudson-element-build.xml.template',
+                Components_Constants::getDataDirectory()
+                . DIRECTORY_SEPARATOR . 'hudson-component-build.xml.template',
                 'r'
             );
             file_put_contents(
@@ -126,8 +126,8 @@ implements Horde_Element_Module
                 sprintf($in, $options['toolsdir'])
             );
             $in = file_get_contents(
-                Horde_Element_Constants::getDataDirectory()
-                . DIRECTORY_SEPARATOR . 'hudson-element-phpunit.xml.template',
+                Components_Constants::getDataDirectory()
+                . DIRECTORY_SEPARATOR . 'hudson-component-phpunit.xml.template',
                 'r'
             );
             file_put_contents(
index 259d5ea..09f406f 100644 (file)
@@ -1,19 +1,19 @@
 <?php
 /**
- * Horde_Element_Module_DevPackage:: generates a development snapshot for the
+ * Components_Module_DevPackage:: generates a development snapshot for the
  * specified package.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * Horde_Element_Module_DevPackage:: generates a development snapshot for the
+ * Components_Module_DevPackage:: generates a development snapshot for the
  * specified package.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_Module_DevPackage
-implements Horde_Element_Module
+class Components_Module_DevPackage
+implements Components_Module
 {
     public function getOptionGroupTitle()
     {
@@ -54,7 +54,7 @@ implements Horde_Element_Module
         );
     }
 
-    public function handle(Horde_Element_Config $config)
+    public function handle(Components_Config $config)
     {
         $options = $config->getOptions();
         if (!empty($options['devpackage'])) {
@@ -62,7 +62,7 @@ implements Horde_Element_Module
         }
     }
 
-    public function run(Horde_Element_Config $config)
+    public function run(Components_Config $config)
     {
         $options = $config->getOptions();
 
index 2a425bc..b7f48a2 100644 (file)
@@ -1,19 +1,19 @@
 <?php
 /**
- * Horde_Element_Module_Installer:: installs a Horde element including
+ * Components_Module_Installer:: installs a Horde element including
  * its dependencies.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * Horde_Element_Module_Installer:: installs a Horde element including
+ * Components_Module_Installer:: installs a Horde element including
  * its dependencies.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_Module_Installer
-implements Horde_Element_Module
+class Components_Module_Installer
+implements Components_Module
 {
     private $_run;
 
@@ -56,7 +56,7 @@ implements Horde_Element_Module
         );
     }
 
-    public function handle(Horde_Element_Config $config)
+    public function handle(Components_Config $config)
     {
         $options = $config->getOptions();
         if (!empty($options['install'])) {
@@ -64,10 +64,9 @@ implements Horde_Element_Module
         }
     }
 
-    public function run(Horde_Element_Config $config)
+    public function run(Components_Config $config)
     {
         $options = $config->getOptions();
-
         $pear = new PEAR();
         $pear->setErrorHandling(PEAR_ERROR_DIE);
 
index 4439527..b0e4f40 100644 (file)
@@ -1,19 +1,19 @@
 <?php
 /**
- * Horde_Element_Module_PearPackageXml:: can update the package.xml of
+ * Components_Module_PearPackageXml:: can update the package.xml of
  * a Horde element.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * Horde_Element_Module_PearPackageXml:: can update the package.xml of
+ * Components_Module_PearPackageXml:: can update the package.xml of
  * a Horde element.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_Module_PearPackageXml
-implements Horde_Element_Module
+class Components_Module_PearPackageXml
+implements Components_Module
 {
     public function getOptionGroupTitle()
     {
@@ -63,7 +63,7 @@ implements Horde_Element_Module
         );
     }
 
-    public function handle(Horde_Element_Config $config)
+    public function handle(Components_Config $config)
     {
         $options = $config->getOptions();
         if (!empty($options['packagexml']) ||
@@ -72,7 +72,7 @@ implements Horde_Element_Module
         }
     }
 
-    public function run(Horde_Element_Config $config)
+    public function run(Components_Config $config)
     {
         $arguments = $config->getArguments();
         $package_file = $arguments[0] . '/package.xml';
@@ -103,7 +103,7 @@ implements Horde_Element_Module
         );
 
         if ($package instanceOf PEAR_Error) {
-            throw new Horde_Element_Exception($package->getMessage());
+            throw new Components_Exception($package->getMessage());
         }
         /**
          * @todo: Looks like this throws away any <replace /> tags we have in
index 9c188f4..023446d 100644 (file)
@@ -1,18 +1,18 @@
 <?php
 /**
- * The Horde_Element_Modules:: class handles a set of Element modules.
+ * The Components_Modules:: class handles a set of Components modules.
  *
  * PHP version 5
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
 
 /**
- * The Horde_Element_Modules:: class handles a set of Element modules.
+ * The Components_Modules:: class handles a set of Components modules.
  *
  * Copyright 2010 The Horde Project (http://www.horde.org/)
  *
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category Horde
- * @package  Element
+ * @package  Components
  * @author   Gunnar Wrobel <wrobel@pardus.de>
  * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Element
+ * @link     http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_Modules
+class Components_Modules
 implements Iterator, Countable
 {
     /**
@@ -46,13 +46,13 @@ implements Iterator, Countable
     /**
      * Add all modules found in the specified directory.
      *
-     * @param string $module_directory Load the modules from this dirrectory.
+     * @param string $module_directory Load the modules from this directory.
      *
      * @return NULL
      */
     public function addModulesFromDirectory(
         $module_directory,
-        $base = 'Horde_Element_Module_'
+        $base = 'Components_Module_'
     ) {
         foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($module_directory)) as $file) {
             if ($file->isFile() && preg_match('/.php$/', $file->getFilename())) {
@@ -95,7 +95,7 @@ implements Iterator, Countable
     /**
      * Implementation of the Iterator next() method. Returns the next module.
      *
-     * @return Horde_Element_Module|null The next module or null if there are no more
+     * @return Components_Module|null The next module or null if there are no more
      * modules.
      */
     public function next()
index 6d1afd8..ad5ebb7 100644 (file)
@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <package packagerversion="1.9.0" version="2.0" xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0 http://pear.php.net/dtd/tasks-1.0.xsd http://pear.php.net/dtd/package-2.0 http://pear.php.net/dtd/package-2.0.xsd">
- <name>Element</name>
+ <name>Components</name>
  <channel>pear.horde.org</channel>
- <summary>A package for handling Horde elements.</summary>
+ <summary>A package for handling Horde components.</summary>
  <description>The package provides utility methods required
- when preparing a new element release for Horde. It also includes
+ when preparing a new component release for Horde. It also includes
  quality control checks.</description>
  <lead>
   <name>Gunnar Wrobel</name>
  <contents>
   <dir baseinstalldir="/" name="/">
    <dir name="data">
-    <file name="hudson-element-build.xml.template" role="data" />
-    <file name="hudson-element-config.xml.template" role="data" />
-    <file name="hudson-element-phpunit.xml.template" role="data" />
+    <file name="hudson-component-build.xml.template" role="data" />
+    <file name="hudson-component-config.xml.template" role="data" />
+    <file name="hudson-component-phpunit.xml.template" role="data" />
    </dir> <!-- /data -->
    <dir name="lib">
-    <dir name="Horde">
-     <dir name="Element">
+    <dir name="Components">
       <dir name="Config">
        <file name="Cli.php" role="php" />
-      </dir> <!-- /lib/Horde/Element/Config -->
+      </dir> <!-- /lib/Components/Config -->
       <dir name="Module">
        <file name="CiSetup.php" role="php" />
        <file name="DevPackage.php" role="php" />
        <file name="Installer.php" role="php" />
        <file name="PearPackageXml.php" role="php" />
-      </dir> <!-- /lib/Horde/Element/Module -->
+      </dir> <!-- /lib/Components/Module -->
       <file name="Config.php" role="php" />
       <file name="Configs.php" role="php" />
       <file name="Constants.php" role="php">
       <file name="Exception.php" role="php" />
       <file name="Module.php" role="php" />
       <file name="Modules.php" role="php" />
-     </dir> <!-- /lib/Horde/Element -->
-     <file name="Element.php" role="php" />
-    </dir> <!-- /lib/Horde -->
+     </dir> <!-- /lib/Components -->
+     <file name="Components.php" role="php" />
    </dir> <!-- /lib -->
    <dir name="script">
-    <file name="horde-element.php" role="script" />
+    <file name="horde-components.php" role="script" />
    </dir> <!-- /script -->
    <dir name="test">
-    <dir name="Horde">
-     <dir name="Element">
+    <dir name="Components">
       <dir name="fixture">
        <dir name="simple">
         <dir name="lib">
          <file name="New.php" role="test" />
          <file name="Second.php" role="test" />
-        </dir> <!-- /test/Horde/Element/fixture/simple/lib -->
-       </dir> <!-- /test/Horde/Element/fixture/simple -->
-      </dir> <!-- /test/Horde/Element/fixture -->
+        </dir> <!-- /test/Components/fixture/simple/lib -->
+       </dir> <!-- /test/Components/fixture/simple -->
+      </dir> <!-- /test/Components/fixture -->
       <dir name="Integration">
-       <file name="ElementTest.php" role="test" />
-      </dir> <!-- /test/Horde/Element/Integration -->
+       <file name="ComponentsTest.php" role="test" />
+      </dir> <!-- /test/Components/Integration -->
       <dir name="Stub">
        <file name="Parser.php" role="test" />
-      </dir> <!-- /test/Horde/Element/Stub -->
+      </dir> <!-- /test/Components/Stub -->
       <file name="AllTests.php" role="test" />
       <file name="Autoload.php" role="test" />
       <file name="phpunit.xml" role="test" />
       <file name="StoryTestCase.php" role="test" />
-     </dir> <!-- /test/Horde/Element -->
-    </dir> <!-- /test/Horde -->
+     </dir> <!-- /test/Components -->
    </dir> <!-- /test -->
    <file name="COPYING" role="doc" />
   </dir> <!-- / -->
     <name>Argv</name>
     <channel>pear.horde.org</channel>
    </package>
+   <package>
+    <name>Injector</name>
+    <channel>pear.horde.org</channel>
+   </package>
   </required>
   <optional>
    <package>
  </dependencies>
  <phprelease>
   <filelist>
-   <install as="hudson-element-build.xml.template" name="data/hudson-element-build.xml.template" />
-   <install as="hudson-element-config.xml.template" name="data/hudson-element-config.xml.template" />
-   <install as="hudson-element-phpunit.xml.template" name="data/hudson-element-phpunit.xml.template" />
-   <install as="Horde/Element.php" name="lib/Horde/Element.php" />
-   <install as="Horde/Element/Config.php" name="lib/Horde/Element/Config.php" />
-   <install as="Horde/Element/Configs.php" name="lib/Horde/Element/Configs.php" />
-   <install as="Horde/Element/Constants.php" name="lib/Horde/Element/Constants.php" />
-   <install as="Horde/Element/Exception.php" name="lib/Horde/Element/Exception.php" />
-   <install as="Horde/Element/Module.php" name="lib/Horde/Element/Module.php" />
-   <install as="Horde/Element/Modules.php" name="lib/Horde/Element/Modules.php" />
-   <install as="Horde/Element/Config/Cli.php" name="lib/Horde/Element/Config/Cli.php" />
-   <install as="Horde/Element/Module/CiSetup.php" name="lib/Horde/Element/Module/CiSetup.php" />
-   <install as="Horde/Element/Module/DevPackage.php" name="lib/Horde/Element/Module/DevPackage.php" />
-   <install as="Horde/Element/Module/Installer.php" name="lib/Horde/Element/Module/Installer.php" />
-   <install as="Horde/Element/Module/PearPackageXml.php" name="lib/Horde/Element/Module/PearPackageXml.php" />
-   <install as="horde-element" name="script/horde-element.php" />
-   <install as="Horde/Element/AllTests.php" name="test/Horde/Element/AllTests.php" />
-   <install as="Horde/Element/Autoload.php" name="test/Horde/Element/Autoload.php" />
-   <install as="Horde/Element/phpunit.xml" name="test/Horde/Element/phpunit.xml" />
-   <install as="Horde/Element/StoryTestCase.php" name="test/Horde/Element/StoryTestCase.php" />
-   <install as="Horde/Element/fixture/simple/lib/New.php" name="test/Horde/Element/fixture/simple/lib/New.php" />
-   <install as="Horde/Element/fixture/simple/lib/Second.php" name="test/Horde/Element/fixture/simple/lib/Second.php" />
-   <install as="Horde/Element/Integration/ElementTest.php" name="test/Horde/Element/Integration/ElementTest.php" />
-   <install as="Horde/Element/Stub/Parser.php" name="test/Horde/Element/Stub/Parser.php" />
+   <install as="hudson-component-build.xml.template" name="data/hudson-component-build.xml.template" />
+   <install as="hudson-component-config.xml.template" name="data/hudson-component-config.xml.template" />
+   <install as="hudson-component-phpunit.xml.template" name="data/hudson-component-phpunit.xml.template" />
+   <install as="Components.php" name="lib/Components.php" />
+   <install as="Components/Config.php" name="lib/Components/Config.php" />
+   <install as="Components/Configs.php" name="lib/Components/Configs.php" />
+   <install as="Components/Constants.php" name="lib/Components/Constants.php" />
+   <install as="Components/Exception.php" name="lib/Components/Exception.php" />
+   <install as="Components/Module.php" name="lib/Components/Module.php" />
+   <install as="Components/Modules.php" name="lib/Components/Modules.php" />
+   <install as="Components/Config/Cli.php" name="lib/Components/Config/Cli.php" />
+   <install as="Components/Module/CiSetup.php" name="lib/Components/Module/CiSetup.php" />
+   <install as="Components/Module/DevPackage.php" name="lib/Components/Module/DevPackage.php" />
+   <install as="Components/Module/Installer.php" name="lib/Components/Module/Installer.php" />
+   <install as="Components/Module/PearPackageXml.php" name="lib/Components/Module/PearPackageXml.php" />
+   <install as="horde-components" name="script/horde-components.php" />
+   <install as="Components/AllTests.php" name="test/Components/AllTests.php" />
+   <install as="Components/Autoload.php" name="test/Components/Autoload.php" />
+   <install as="Components/phpunit.xml" name="test/Components/phpunit.xml" />
+   <install as="Components/StoryTestCase.php" name="test/Components/StoryTestCase.php" />
+   <install as="Components/fixture/simple/lib/New.php" name="test/Components/fixture/simple/lib/New.php" />
+   <install as="Components/fixture/simple/lib/Second.php" name="test/Components/fixture/simple/lib/Second.php" />
+   <install as="Components/Integration/ComponentsTest.php" name="test/Components/Integration/ComponentsTest.php" />
+   <install as="Components/Stub/Parser.php" name="test/Components/Stub/Parser.php" />
   </filelist>
  </phprelease>
  <changelog>
index f0ae98f..22e54b2 100755 (executable)
@@ -1,4 +1,4 @@
 #!/usr/bin/env php
 <?php
 require_once 'Horde/Autoloader/Default.php';
-Horde_Element::main();
+Components::main();
index deb0ed8..846ffe1 100644 (file)
@@ -1,22 +1,22 @@
 <?php
 /**
- * All tests for the Horde_Element:: package.
+ * All tests for the Components:: package.
  *
  * PHP version 5
  *
  * @category   Horde
- * @package    Element
+ * @package    Components
  * @subpackage UnitTests
  * @author     Gunnar Wrobel <wrobel@pardus.de>
  * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link       http://pear.horde.org/index.php?package=Element
+ * @link       http://pear.horde.org/index.php?package=Components
  */
 
 /**
  * Define the main method
  */
 if (!defined('PHPUnit_MAIN_METHOD')) {
-    define('PHPUnit_MAIN_METHOD', 'Horde_Element_AllTests::main');
+    define('PHPUnit_MAIN_METHOD', 'Components_AllTests::main');
 }
 
 /**
@@ -33,18 +33,18 @@ require_once 'Horde/Test/AllTests.php';
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category   Horde
- * @package    Element
+ * @package    Components
  * @subpackage UnitTests
  * @author     Gunnar Wrobel <wrobel@pardus.de>
  * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link       http://pear.horde.org/index.php?package=Element
+ * @link       http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_AllTests extends Horde_Test_AllTests
+class Components_AllTests extends Horde_Test_AllTests
 {
 }
 
-Horde_Element_AllTests::init('Horde_Element', __FILE__);
+Components_AllTests::init('Components', __FILE__);
 
-if (PHPUnit_MAIN_METHOD == 'Horde_Element_AllTests::main') {
-    Horde_Element_AllTests::main();
+if (PHPUnit_MAIN_METHOD == 'Components_AllTests::main') {
+    Components_AllTests::main();
 }
index b0b1fb6..b347717 100644 (file)
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category   Horde
- * @package    Element
+ * @package    Components
  * @subpackage UnitTests
  * @author     Gunnar Wrobel <wrobel@pardus.de>
  * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link       http://pear.horde.org/index.php?package=Element
+ * @link       http://pear.horde.org/index.php?package=Components
  */
 
 if (!spl_autoload_functions()) {
diff --git a/components/test/Components/Integration/ComponentsTest.php b/components/test/Components/Integration/ComponentsTest.php
new file mode 100644 (file)
index 0000000..15c0752
--- /dev/null
@@ -0,0 +1,121 @@
+<?php
+/**
+ * Test the Components package.
+ *
+ * PHP version 5
+ *
+ * @category   Horde
+ * @package    Components
+ * @subpackage UnitTests
+ * @author     Gunnar Wrobel <wrobel@pardus.de>
+ * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link       http://pear.horde.org/index.php?package=Components
+ */
+
+/**
+ * Prepare the test setup.
+ */
+require_once dirname(__FILE__) . '/../Autoload.php';
+
+/**
+ * Test the Components package.
+ *
+ * Copyright 2010 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (LGPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
+ *
+ * @category   Horde
+ * @package    Components
+ * @subpackage UnitTests
+ * @author     Gunnar Wrobel <wrobel@pardus.de>
+ * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link       http://pear.horde.org/index.php?package=Components
+ */
+class Components_Integration_ComponentsTest
+extends Components_StoryTestCase
+{
+    /**
+     * @scenario
+     */
+    public function theHelpOptionResultsInHelpOutput()
+    {
+        $this->given('the default Components setup')
+            ->when('calling the package with the help option')
+            ->then('the help will be displayed');
+    }
+
+    /**
+     * @scenario
+     */
+    public function thePearpackagexmlModuleAddsThePOptionInTheHelpOutput()
+    {
+        $this->given('the default Components setup')
+            ->when('calling the package with the help option')
+            ->then('the help will contain the "p" option.');
+    }
+
+    /**
+     * @scenario
+     */
+    public function thePearpackagexmlModuleAddsTheUOptionInTheHelpOutput()
+    {
+        $this->given('the default Components setup')
+            ->when('calling the package with the help option')
+            ->then('the help will contain the "u" option.');
+    }
+
+    /**
+     * @scenario
+     */
+    public function theDevpackageModuleAddsTheDOptionInTheHelpOutput()
+    {
+        $this->given('the default Components setup')
+            ->when('calling the package with the help option')
+            ->then('the help will contain the "d" option.');
+    }
+
+    /**
+     * @scenario
+     */
+    public function theThePOptionProvidesAnUpdatedPackageXml()
+    {
+        $this->given('the default Components setup')
+            ->when('calling the package with the packagexml option and a Horde element')
+            ->then('the new package.xml of the Horde element will be printed.');
+    }
+
+    /**
+     * @todo Test (and fix) the reactions to three more scenarios:
+     *  - invalid XML in the package.xml (e.g. tag missing)
+     *  - empty file list
+     *  - file list with just one entry.
+     *
+     * All three scenarios yield errors which are still hard to
+     * understand.
+     */
+
+    /**
+     * @scenario
+     */
+    public function theInstallerModuleAddsTheIOptionInTheHelpOutput()
+    {
+        $this->given('the default Components setup')
+            ->when('calling the package with the help option')
+            ->then('the help will contain the "i" option.');
+    }
+
+    /**
+     * @scenario
+     */
+    public function theTheIOptionInstallsThePackageFromTheCurrentTree()
+    {
+        $this->given('the default Components setup')
+            ->when('calling the package with the install option and a Horde element')
+            ->then('a new PEAR configuration file will be installed')
+            ->and('the PEAR package will be installed')
+            ->and('the non-Horde dependencies of the Horde element will get installed from the network.')
+            ->and('the Horde dependencies of the Horde element will get installed from the current tree.')
+            ->and('the Horde element will be installed');
+    }
+}
\ No newline at end of file
diff --git a/components/test/Components/Integration/ElementTest.php b/components/test/Components/Integration/ElementTest.php
deleted file mode 100644 (file)
index 9d461db..0000000
+++ /dev/null
@@ -1,121 +0,0 @@
-<?php
-/**
- * Test the Element package.
- *
- * PHP version 5
- *
- * @category   Horde
- * @package    Element
- * @subpackage UnitTests
- * @author     Gunnar Wrobel <wrobel@pardus.de>
- * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link       http://pear.horde.org/index.php?package=Element
- */
-
-/**
- * Prepare the test setup.
- */
-require_once dirname(__FILE__) . '/../Autoload.php';
-
-/**
- * Test the Element package.
- *
- * Copyright 2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (LGPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
- *
- * @category   Horde
- * @package    Element
- * @subpackage UnitTests
- * @author     Gunnar Wrobel <wrobel@pardus.de>
- * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link       http://pear.horde.org/index.php?package=Element
- */
-class Horde_Element_Integration_ElementTest
-extends Horde_Element_StoryTestCase
-{
-    /**
-     * @scenario
-     */
-    public function theHelpOptionResultsInHelpOutput()
-    {
-        $this->given('the default Element setup')
-            ->when('calling the package with the help option')
-            ->then('the help will be displayed');
-    }
-
-    /**
-     * @scenario
-     */
-    public function thePearpackagexmlModuleAddsThePOptionInTheHelpOutput()
-    {
-        $this->given('the default Element setup')
-            ->when('calling the package with the help option')
-            ->then('the help will contain the "p" option.');
-    }
-
-    /**
-     * @scenario
-     */
-    public function thePearpackagexmlModuleAddsTheUOptionInTheHelpOutput()
-    {
-        $this->given('the default Element setup')
-            ->when('calling the package with the help option')
-            ->then('the help will contain the "u" option.');
-    }
-
-    /**
-     * @scenario
-     */
-    public function theDevpackageModuleAddsTheDOptionInTheHelpOutput()
-    {
-        $this->given('the default Element setup')
-            ->when('calling the package with the help option')
-            ->then('the help will contain the "d" option.');
-    }
-
-    /**
-     * @scenario
-     */
-    public function theThePOptionProvidesAnUpdatedPackageXml()
-    {
-        $this->given('the default Element setup')
-            ->when('calling the package with the packagexml option and a Horde element')
-            ->then('the new package.xml of the Horde element will be printed.');
-    }
-
-    /**
-     * @todo Test (and fix) the reactions to three more scenarios:
-     *  - invalid XML in the package.xml (e.g. tag missing)
-     *  - empty file list
-     *  - file list with just one entry.
-     *
-     * All three scenarios yield errors which are still hard to
-     * understand.
-     */
-
-    /**
-     * @scenario
-     */
-    public function theInstallerModuleAddsTheIOptionInTheHelpOutput()
-    {
-        $this->given('the default Element setup')
-            ->when('calling the package with the help option')
-            ->then('the help will contain the "i" option.');
-    }
-
-    /**
-     * @scenario
-     */
-    public function theTheIOptionInstallsThePackageFromTheCurrentTree()
-    {
-        $this->given('the default Element setup')
-            ->when('calling the package with the install option and a Horde element')
-            ->then('a new PEAR configuration file will be installed')
-            ->and('the PEAR package will be installed')
-            ->and('the non-Horde dependencies of the Horde element will get installed from the network.')
-            ->and('the Horde dependencies of the Horde element will get installed from the current tree.')
-            ->and('the Horde element will be installed');
-    }
-}
\ No newline at end of file
index 4d05428..54f5dda 100644 (file)
@@ -5,11 +5,11 @@
  * PHP version 5
  *
  * @category   Horde
- * @package    Element
+ * @package    Components
  * @subpackage UnitTests
  * @author     Gunnar Wrobel <wrobel@pardus.de>
  * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link       http://pear.horde.org/index.php?package=Element
+ * @link       http://pear.horde.org/index.php?package=Components
  */
 
 /**
  * did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
  *
  * @category   Horde
- * @package    Element
+ * @package    Components
  * @subpackage UnitTests
  * @author     Gunnar Wrobel <wrobel@pardus.de>
  * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link       http://pear.horde.org/index.php?package=Element
+ * @link       http://pear.horde.org/index.php?package=Components
  */
-class Horde_Element_StoryTestCase
+class Components_StoryTestCase
 extends PHPUnit_Extensions_Story_TestCase
 {
     public function tearDown()
@@ -49,7 +49,7 @@ extends PHPUnit_Extensions_Story_TestCase
     public function runGiven(&$world, $action, $arguments)
     {
         switch($action) {
-        case 'the default Element setup':
+        case 'the default Components setup':
             break;
         default:
             return $this->notImplemented($action);
@@ -70,43 +70,43 @@ extends PHPUnit_Extensions_Story_TestCase
         switch($action) {
         case 'calling the package with the help option':
             $_SERVER['argv'] = array(
-                'horde-element',
+                'horde-components',
                 '--help',
                 dirname(__FILE__) . '/fixture/empty'
             );
             ob_start();
             $parameters = array();
-            $parameters['cli']['parser']['class'] = 'Horde_Element_Stub_Parser';
-            Horde_Element::main($parameters);
+            $parameters['cli']['parser']['class'] = 'Components_Stub_Parser';
+            Components::main($parameters);
             $world['output'] = ob_get_contents();
             ob_end_clean();
             break;
         case 'calling the package with the packagexml option and a Horde element':
             $_SERVER['argv'] = array(
-                'horde-element',
+                'horde-components',
                 '--packagexml',
                 dirname(__FILE__) . '/fixture/simple'
             );
             ob_start();
             $parameters = array();
-            $parameters['cli']['parser']['class'] = 'Horde_Element_Stub_Parser';
+            $parameters['cli']['parser']['class'] = 'Components_Stub_Parser';
             $old_errorreporting = error_reporting(E_ALL & ~E_STRICT);
-            Horde_Element::main($parameters);
+            Components::main($parameters);
             error_reporting($old_errorreporting);
             $world['output'] = ob_get_contents();
             ob_end_clean();
             break;
         case 'calling the package with the install option and a Horde element':
             $_SERVER['argv'] = array(
-                'horde-element',
+                'horde-components',
                 '--install=' . $this->_getTemporaryDirectory(),
-                dirname(__FILE__) . '/../../../'
+                dirname(__FILE__) . '/../../'
             );
             ob_start();
             $parameters = array();
-            $parameters['cli']['parser']['class'] = 'Horde_Element_Stub_Parser';
+            $parameters['cli']['parser']['class'] = 'Components_Stub_Parser';
             $old_errorreporting = error_reporting(E_ALL & ~E_STRICT);
-            Horde_Element::main($parameters);
+            Components::main($parameters);
             error_reporting($old_errorreporting);
             $world['output'] = ob_get_contents();
             ob_end_clean();
@@ -209,7 +209,7 @@ extends PHPUnit_Extensions_Story_TestCase
                     . 'pear' . DIRECTORY_SEPARATOR 
                     . 'php' . DIRECTORY_SEPARATOR
                     . 'Horde' . DIRECTORY_SEPARATOR
-                    . 'Element.php'
+                    . 'Components.php'
                 )
             );
             break;
@@ -221,7 +221,7 @@ extends PHPUnit_Extensions_Story_TestCase
     private function _getTemporaryDirectory()
     {
         $this->_temp_dir = sys_get_temp_dir() . DIRECTORY_SEPARATOR
-            . 'Horde_Element_' . mt_rand();
+            . 'Components_' . mt_rand();
         mkdir($this->_temp_dir);
         return $this->_temp_dir;
     }
index e704661..082b795 100644 (file)
@@ -1,5 +1,5 @@
 <?php
-class Horde_Element_Stub_Parser
+class Components_Stub_Parser
 extends Horde_Argv_Parser
 {
     public function parserExit($status = 0, $msg = null)
index 1e9db87..bd23ace 100644 (file)
@@ -3,7 +3,7 @@
  <name>Fixture</name>
  <channel>pear.horde.org</channel>
  <summary>Test fixture.</summary>
- <description>A dummy package.xml used for testing the Horde_Element package.</description>
+ <description>A dummy package.xml used for testing the Components package.</description>
  <lead>
   <name>Gunnar Wrobel</name>
   <user>wrobel</user>