From fb8b2d7151aeded0981232c6ffdd0b6c33580507 Mon Sep 17 00:00:00 2001
From: Gunnar Wrobel
Date: Sun, 22 Aug 2010 19:33:24 +0200
Subject: [PATCH] Rename Horde_Qc to Horde_Element. I hope that fits better for
what I have in mind for this package of tools.
---
framework/{Qc => Element}/COPYING | 0
.../Horde/Qc.php => Element/lib/Horde/Element.php} | 36 ++++++------
.../lib/Horde/Element}/Autoloader.php | 4 +-
.../Qc => Element/lib/Horde/Element}/Config.php | 22 ++++----
.../lib/Horde/Element}/Config/Cli.php | 26 ++++-----
.../Qc => Element/lib/Horde/Element}/Configs.php | 28 +++++-----
.../Qc => Element/lib/Horde/Element}/Exception.php | 14 ++---
.../Qc => Element/lib/Horde/Element}/Module.php | 18 +++---
.../lib/Horde/Element}/Module/PearPackageXml.php | 22 ++++----
.../Qc => Element/lib/Horde/Element}/Modules.php | 20 +++----
framework/{Qc => Element}/package.xml | 64 +++++++++++-----------
framework/Element/script/horde-element.php | 4 ++
.../Qc => Element/test/Horde/Element}/AllTests.php | 20 +++----
.../Qc => Element/test/Horde/Element}/Autoload.php | 4 +-
.../Horde/Element/Integration/ElementTest.php} | 22 ++++----
.../test/Horde/Element}/StoryTestCase.php | 18 +++---
.../test/Horde/Element}/Stub/Parser.php | 2 +-
.../test/Horde/Element}/fixture/package.xml | 0
.../Qc => Element/test/Horde/Element}/phpunit.xml | 0
framework/Qc/script/horde-quality-control.php | 4 --
20 files changed, 165 insertions(+), 163 deletions(-)
rename framework/{Qc => Element}/COPYING (100%)
rename framework/{Qc/lib/Horde/Qc.php => Element/lib/Horde/Element.php} (70%)
rename framework/{Qc/lib/Horde/Qc => Element/lib/Horde/Element}/Autoloader.php (84%)
rename framework/{Qc/lib/Horde/Qc => Element/lib/Horde/Element}/Config.php (64%)
rename framework/{Qc/lib/Horde/Qc => Element/lib/Horde/Element}/Config/Cli.php (78%)
rename framework/{Qc/lib/Horde/Qc => Element/lib/Horde/Element}/Configs.php (76%)
rename framework/{Qc/lib/Horde/Qc => Element/lib/Horde/Element}/Exception.php (60%)
rename framework/{Qc/lib/Horde/Qc => Element/lib/Horde/Element}/Module.php (59%)
rename framework/{Qc/lib/Horde/Qc => Element/lib/Horde/Element}/Module/PearPackageXml.php (88%)
rename framework/{Qc/lib/Horde/Qc => Element/lib/Horde/Element}/Modules.php (84%)
rename framework/{Qc => Element}/package.xml (59%)
create mode 100755 framework/Element/script/horde-element.php
rename framework/{Qc/test/Horde/Qc => Element/test/Horde/Element}/AllTests.php (60%)
rename framework/{Qc/test/Horde/Qc => Element/test/Horde/Element}/Autoload.php (92%)
rename framework/{Qc/test/Horde/Qc/Integration/QcTest.php => Element/test/Horde/Element/Integration/ElementTest.php} (74%)
rename framework/{Qc/test/Horde/Qc => Element/test/Horde/Element}/StoryTestCase.php (88%)
rename framework/{Qc/test/Horde/Qc => Element/test/Horde/Element}/Stub/Parser.php (82%)
rename framework/{Qc/test/Horde/Qc => Element/test/Horde/Element}/fixture/package.xml (100%)
rename framework/{Qc/test/Horde/Qc => Element/test/Horde/Element}/phpunit.xml (100%)
delete mode 100755 framework/Qc/script/horde-quality-control.php
diff --git a/framework/Qc/COPYING b/framework/Element/COPYING
similarity index 100%
rename from framework/Qc/COPYING
rename to framework/Element/COPYING
diff --git a/framework/Qc/lib/Horde/Qc.php b/framework/Element/lib/Horde/Element.php
similarity index 70%
rename from framework/Qc/lib/Horde/Qc.php
rename to framework/Element/lib/Horde/Element.php
index eedf26fd7..70816d7d1 100644
--- a/framework/Qc/lib/Horde/Qc.php
+++ b/framework/Element/lib/Horde/Element.php
@@ -1,20 +1,20 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
- * The Horde_Qc:: class is the entry point for the various quality control /
- * packaging actions provided by the package.
+ * The Horde_Element:: class is the entry point for the various Horde
+ * element actions provided by the package.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
@@ -22,12 +22,12 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-class Horde_Qc
+class Horde_Element
{
/**
* The main entry point for the application.
@@ -47,7 +47,7 @@ class Horde_Qc
$config->handleModules($modules);
try {
self::_validateArguments($config);
- } catch (Horde_Qc_Exception $e) {
+ } catch (Horde_Element_Exception $e) {
$parser->parserError($e->getMessage());
return;
}
@@ -72,9 +72,9 @@ class Horde_Qc
static private function _prepareConfig(Horde_Argv_Parser $parser)
{
- $config = new Horde_Qc_Configs();
+ $config = new Horde_Element_Configs();
$config->addConfigurationType(
- new Horde_Qc_Config_Cli(
+ new Horde_Element_Config_Cli(
$parser
)
);
@@ -83,24 +83,24 @@ class Horde_Qc
static private function _prepareModules()
{
- $modules = new Horde_Qc_Modules();
- $modules->addModulesFromDirectory(dirname(__FILE__) . '/Qc/Module');
+ $modules = new Horde_Element_Modules();
+ $modules->addModulesFromDirectory(dirname(__FILE__) . '/Element/Module');
return $modules;
}
- static private function _validateArguments(Horde_Qc_Config $config)
+ static private function _validateArguments(Horde_Element_Config $config)
{
$arguments = $config->getArguments();
if (empty($arguments[0])) {
- throw new Horde_Qc_Exception('Please specify the path of the PEAR package!');
+ throw new Horde_Element_Exception('Please specify the path of the PEAR package!');
}
if (!is_dir($arguments[0])) {
- throw new Horde_Qc_Exception(sprintf('%s specifies no directory!', $arguments[0]));
+ throw new Horde_Element_Exception(sprintf('%s specifies no directory!', $arguments[0]));
}
if (!file_exists($arguments[0] . '/package.xml')) {
- throw new Horde_Qc_Exception(sprintf('There is no package.xml at %s!', $arguments[0]));
+ throw new Horde_Element_Exception(sprintf('There is no package.xml at %s!', $arguments[0]));
}
}
}
\ No newline at end of file
diff --git a/framework/Qc/lib/Horde/Qc/Autoloader.php b/framework/Element/lib/Horde/Element/Autoloader.php
similarity index 84%
rename from framework/Qc/lib/Horde/Qc/Autoloader.php
rename to framework/Element/lib/Horde/Element/Autoloader.php
index e91dad399..d4f36ca04 100644
--- a/framework/Qc/lib/Horde/Qc/Autoloader.php
+++ b/framework/Element/lib/Horde/Element/Autoloader.php
@@ -4,7 +4,7 @@ require_once 'Horde/Autoloader.php';
require_once 'Horde/Autoloader/ClassPathMapper.php';
require_once 'Horde/Autoloader/ClassPathMapper/Default.php';
-class Horde_Qc_Autoloader extends Horde_Autoloader
+class Horde_Element_Autoloader extends Horde_Autoloader
{
public function __construct()
{
@@ -18,5 +18,5 @@ class Horde_Qc_Autoloader extends Horde_Autoloader
}
}
-$__autoloader = new Horde_Qc_Autoloader();
+$__autoloader = new Horde_Element_Autoloader();
$__autoloader->registerAutoloader();
diff --git a/framework/Qc/lib/Horde/Qc/Config.php b/framework/Element/lib/Horde/Element/Config.php
similarity index 64%
rename from framework/Qc/lib/Horde/Qc/Config.php
rename to framework/Element/lib/Horde/Element/Config.php
index d486dfac8..da22e4680 100644
--- a/framework/Qc/lib/Horde/Qc/Config.php
+++ b/framework/Element/lib/Horde/Element/Config.php
@@ -1,20 +1,20 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
- * Horde_Qc_Config:: interface represents a configuration type for the Horde
- * quality control tool.
+ * Horde_Element_Config:: interface represents a configuration type for the Horde
+ * element tool.
*
* Copyright 2009-2010 The Horde Project (http://www.horde.org/)
*
@@ -22,20 +22,20 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-interface Horde_Qc_Config
+interface Horde_Element_Config
{
/**
* Provide each configuration handler with the list of supported modules.
*
- * @param Horde_Qc_Modules $modules A list of modules.
+ * @param Horde_Element_Modules $modules A list of modules.
* @return NULL
*/
- public function handleModules(Horde_Qc_Modules $modules);
+ public function handleModules(Horde_Element_Modules $modules);
/**
* Return the options provided by the configuration handlers.
diff --git a/framework/Qc/lib/Horde/Qc/Config/Cli.php b/framework/Element/lib/Horde/Element/Config/Cli.php
similarity index 78%
rename from framework/Qc/lib/Horde/Qc/Config/Cli.php
rename to framework/Element/lib/Horde/Element/Config/Cli.php
index 4e6ae275c..6f63f94a4 100644
--- a/framework/Qc/lib/Horde/Qc/Config/Cli.php
+++ b/framework/Element/lib/Horde/Element/Config/Cli.php
@@ -1,20 +1,20 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
- * Horde_Qc_Config_Cli:: class provides the command line interface for the Horde
- * quality control tool.
+ * Horde_Element_Config_Cli:: class provides the command line interface for the Horde
+ * element tool.
*
* Copyright 2009-2010 The Horde Project (http://www.horde.org/)
*
@@ -22,13 +22,13 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-class Horde_Qc_Config_Cli
-implements Horde_Qc_Config
+class Horde_Element_Config_Cli
+implements Horde_Element_Config
{
/**
* The command line argument parser.
@@ -64,10 +64,10 @@ implements Horde_Qc_Config
/**
* Load the options for the list of supported modules.
*
- * @param Horde_Qc_Modules $modules A list of modules.
+ * @param Horde_Element_Modules $modules A list of modules.
* @return NULL
*/
- public function handleModules(Horde_Qc_Modules $modules)
+ public function handleModules(Horde_Element_Modules $modules)
{
foreach ($modules as $module) {
$this->_addOptionsFromModule($this->_parser, $module);
@@ -100,7 +100,7 @@ implements Horde_Qc_Config
* Add an option group from the provided module to the parser.
*
* @param Horde_Argv_Parser $parser The parser.
- * @param Horde_Qc_Module $module The module providing the option group.
+ * @param Horde_Element_Module $module The module providing the option group.
*
* @return NULL
*/
diff --git a/framework/Qc/lib/Horde/Qc/Configs.php b/framework/Element/lib/Horde/Element/Configs.php
similarity index 76%
rename from framework/Qc/lib/Horde/Qc/Configs.php
rename to framework/Element/lib/Horde/Element/Configs.php
index 2888faf96..ee5a07203 100644
--- a/framework/Qc/lib/Horde/Qc/Configs.php
+++ b/framework/Element/lib/Horde/Element/Configs.php
@@ -1,20 +1,20 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
- * Horde_Qc_Configs:: class represents configuration for the Horde quality
- * control tool.
+ * Horde_Element_Configs:: class represents configuration for the
+ * Horde element tool.
*
* Copyright 2009-2010 The Horde Project (http://www.horde.org/)
*
@@ -22,13 +22,13 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-class Horde_Qc_Configs
-implements Horde_Qc_Config
+class Horde_Element_Configs
+implements Horde_Element_Config
{
/**
@@ -48,21 +48,21 @@ implements Horde_Qc_Config
/**
* Add a configuration type to the configuration handler.
*
- * @param Horde_Qc_Config $type The configuration type.
+ * @param Horde_Element_Config $type The configuration type.
*
* @return NULL
*/
- public function addConfigurationType(Horde_Qc_Config $type) {
+ public function addConfigurationType(Horde_Element_Config $type) {
$this->_configs[] = $type;
}
/**
* Provide each configuration handler with the list of supported modules.
*
- * @param Horde_Qc_Modules $modules A list of modules.
+ * @param Horde_Element_Modules $modules A list of modules.
* @return NULL
*/
- public function handleModules(Horde_Qc_Modules $modules)
+ public function handleModules(Horde_Element_Modules $modules)
{
foreach ($this->_configs as $config) {
$config->handleModules($modules);
diff --git a/framework/Qc/lib/Horde/Qc/Exception.php b/framework/Element/lib/Horde/Element/Exception.php
similarity index 60%
rename from framework/Qc/lib/Horde/Qc/Exception.php
rename to framework/Element/lib/Horde/Element/Exception.php
index 9e8d00461..115b70a88 100644
--- a/framework/Qc/lib/Horde/Qc/Exception.php
+++ b/framework/Element/lib/Horde/Element/Exception.php
@@ -1,18 +1,18 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
- * This class provides the standard error class for the Qc package.
+ * This class provides the standard error class for the Element package.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
@@ -20,12 +20,12 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-class Horde_Qc_Exception
+class Horde_Element_Exception
extends Exception
{
}
diff --git a/framework/Qc/lib/Horde/Qc/Module.php b/framework/Element/lib/Horde/Element/Module.php
similarity index 59%
rename from framework/Qc/lib/Horde/Qc/Module.php
rename to framework/Element/lib/Horde/Element/Module.php
index ac7886ec0..43a98627d 100644
--- a/framework/Qc/lib/Horde/Qc/Module.php
+++ b/framework/Element/lib/Horde/Element/Module.php
@@ -1,18 +1,18 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
- * Horde_Qc_Module:: represents a single quality control module.
+ * Horde_Element_Module:: represents a task for a Horde element.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
@@ -20,12 +20,12 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-interface Horde_Qc_Module
+interface Horde_Element_Module
{
public function getOptionGroupTitle();
@@ -33,7 +33,7 @@ interface Horde_Qc_Module
public function getOptionGroupOptions();
- public function handle(Horde_Qc_Config $config);
+ public function handle(Horde_Element_Config $config);
- public function run(Horde_Qc_Config $config);
+ public function run(Horde_Element_Config $config);
}
\ No newline at end of file
diff --git a/framework/Qc/lib/Horde/Qc/Module/PearPackageXml.php b/framework/Element/lib/Horde/Element/Module/PearPackageXml.php
similarity index 88%
rename from framework/Qc/lib/Horde/Qc/Module/PearPackageXml.php
rename to framework/Element/lib/Horde/Element/Module/PearPackageXml.php
index 68f33961b..e59b0af62 100644
--- a/framework/Qc/lib/Horde/Qc/Module/PearPackageXml.php
+++ b/framework/Element/lib/Horde/Element/Module/PearPackageXml.php
@@ -1,18 +1,20 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
- * Horde_Qc_Module:: interface represents a single quality control module.
+ * Horde_Element_Module_PearPackageXml:: can update the package.xml of
+ * a Horde element.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
@@ -20,13 +22,13 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-class Horde_Qc_Module_PearPackageXml
-implements Horde_Qc_Module
+class Horde_Element_Module_PearPackageXml
+implements Horde_Element_Module
{
public function getOptionGroupTitle()
{
@@ -61,7 +63,7 @@ implements Horde_Qc_Module
);
}
- public function handle(Horde_Qc_Config $config)
+ public function handle(Horde_Element_Config $config)
{
$options = $config->getOptions();
if (!empty($options['packagexml']) ||
@@ -70,7 +72,7 @@ implements Horde_Qc_Module
}
}
- public function run(Horde_Qc_Config $config)
+ public function run(Horde_Element_Config $config)
{
$arguments = $config->getArguments();
$package_file = $arguments[0] . '/package.xml';
diff --git a/framework/Qc/lib/Horde/Qc/Modules.php b/framework/Element/lib/Horde/Element/Modules.php
similarity index 84%
rename from framework/Qc/lib/Horde/Qc/Modules.php
rename to framework/Element/lib/Horde/Element/Modules.php
index f52d0d6ba..5633b7377 100644
--- a/framework/Qc/lib/Horde/Qc/Modules.php
+++ b/framework/Element/lib/Horde/Element/Modules.php
@@ -1,18 +1,18 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
- * The Horde_Qc_Modules:: class handles a set of Qc modules.
+ * The Horde_Element_Modules:: class handles a set of Element modules.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
@@ -20,12 +20,12 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-class Horde_Qc_Modules
+class Horde_Element_Modules
implements Iterator, Countable
{
/**
@@ -52,7 +52,7 @@ implements Iterator, Countable
*/
public function addModulesFromDirectory(
$module_directory,
- $base = 'Horde_Qc_Module_'
+ $base = 'Horde_Element_Module_'
) {
foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($module_directory)) as $file) {
if ($file->isFile() && preg_match('/.php$/', $file->getFilename())) {
@@ -66,7 +66,7 @@ implements Iterator, Countable
}
/**
- * Implementation of the Iterator rewind() method. Reqinds the module list.
+ * Implementation of the Iterator rewind() method. Rewinds the module list.
*
* return NULL
*/
@@ -98,7 +98,7 @@ implements Iterator, Countable
/**
* Implementation of the Iterator next() method. Returns the next module.
*
- * @return Horde_Qc_Module|null The next module or null if there are no more
+ * @return Horde_Element_Module|null The next module or null if there are no more
* modules.
*/
public function next()
diff --git a/framework/Qc/package.xml b/framework/Element/package.xml
similarity index 59%
rename from framework/Qc/package.xml
rename to framework/Element/package.xml
index 2e4446355..aecbe7af9 100644
--- a/framework/Qc/package.xml
+++ b/framework/Element/package.xml
@@ -1,11 +1,11 @@
- Qc
+ Element
pear.horde.org
- A package for preparing Horde PEAR releases.
- The package provides utility methods usually required
- when preparing a new PEAR package release for Horde. It also includes
- a number of quality control checks.
+ A package for handling Horde elements.
+ The package provides utility methods required
+ when preparing a new element release for Horde. It also includes
+ quality control checks.
Gunnar Wrobel
wrobel
@@ -42,40 +42,40 @@
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
-
+
+
-
+
-
+
@@ -107,22 +107,22 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/framework/Element/script/horde-element.php b/framework/Element/script/horde-element.php
new file mode 100755
index 000000000..25111ad89
--- /dev/null
+++ b/framework/Element/script/horde-element.php
@@ -0,0 +1,4 @@
+#!/usr/bin/env php
+
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
* Define the main method
*/
if (!defined('PHPUnit_MAIN_METHOD')) {
- define('PHPUnit_MAIN_METHOD', 'Horde_Qc_AllTests::main');
+ define('PHPUnit_MAIN_METHOD', 'Horde_Element_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 Qc
+ * @package Element
* @subpackage UnitTests
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-class Horde_Qc_AllTests extends Horde_Test_AllTests
+class Horde_Element_AllTests extends Horde_Test_AllTests
{
}
-Horde_Qc_AllTests::init('Horde_Qc', __FILE__);
+Horde_Element_AllTests::init('Horde_Element', __FILE__);
-if (PHPUnit_MAIN_METHOD == 'Horde_Qc_AllTests::main') {
- Horde_Qc_AllTests::main();
+if (PHPUnit_MAIN_METHOD == 'Horde_Element_AllTests::main') {
+ Horde_Element_AllTests::main();
}
diff --git a/framework/Qc/test/Horde/Qc/Autoload.php b/framework/Element/test/Horde/Element/Autoload.php
similarity index 92%
rename from framework/Qc/test/Horde/Qc/Autoload.php
rename to framework/Element/test/Horde/Element/Autoload.php
index f3bdae77f..b0b1fb6ca 100644
--- a/framework/Qc/test/Horde/Qc/Autoload.php
+++ b/framework/Element/test/Horde/Element/Autoload.php
@@ -10,11 +10,11 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @subpackage UnitTests
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
if (!spl_autoload_functions()) {
diff --git a/framework/Qc/test/Horde/Qc/Integration/QcTest.php b/framework/Element/test/Horde/Element/Integration/ElementTest.php
similarity index 74%
rename from framework/Qc/test/Horde/Qc/Integration/QcTest.php
rename to framework/Element/test/Horde/Element/Integration/ElementTest.php
index 93e10defb..b9e83826a 100644
--- a/framework/Qc/test/Horde/Qc/Integration/QcTest.php
+++ b/framework/Element/test/Horde/Element/Integration/ElementTest.php
@@ -1,15 +1,15 @@
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
@@ -18,7 +18,7 @@
require_once dirname(__FILE__) . '/../Autoload.php';
/**
- * Test the Qc package.
+ * Test the Element package.
*
* Copyright 2010 The Horde Project (http://www.horde.org/)
*
@@ -26,21 +26,21 @@ require_once dirname(__FILE__) . '/../Autoload.php';
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @subpackage UnitTests
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-class Horde_Qc_Integration_QcTest
-extends Horde_Qc_StoryTestCase
+class Horde_Element_Integration_ElementTest
+extends Horde_Element_StoryTestCase
{
/**
* @scenario
*/
public function theHelpOptionResultsInHelpOutput()
{
- $this->given('the default QC package setup')
+ $this->given('the default Element setup')
->when('calling the package with the help option')
->then('the help will be displayed');
}
@@ -50,7 +50,7 @@ extends Horde_Qc_StoryTestCase
*/
public function thePearpackagexmlModuleAddsThePOptionInTheHelpOutput()
{
- $this->given('the default QC package setup')
+ $this->given('the default Element setup')
->when('calling the package with the help option')
->then('the help will contain the "p" option.');
}
@@ -60,7 +60,7 @@ extends Horde_Qc_StoryTestCase
*/
public function thePearpackagexmlModuleAddsTheUOptionInTheHelpOutput()
{
- $this->given('the default QC package setup')
+ $this->given('the default Element setup')
->when('calling the package with the help option')
->then('the help will contain the "u" option.');
}
diff --git a/framework/Qc/test/Horde/Qc/StoryTestCase.php b/framework/Element/test/Horde/Element/StoryTestCase.php
similarity index 88%
rename from framework/Qc/test/Horde/Qc/StoryTestCase.php
rename to framework/Element/test/Horde/Element/StoryTestCase.php
index 428bd9818..7b41e0a8c 100644
--- a/framework/Qc/test/Horde/Qc/StoryTestCase.php
+++ b/framework/Element/test/Horde/Element/StoryTestCase.php
@@ -5,11 +5,11 @@
* PHP version 5
*
* @category Horde
- * @package Qc
+ * @package Element
* @subpackage UnitTests
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
/**
@@ -21,13 +21,13 @@
* did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
*
* @category Horde
- * @package Qc
+ * @package Element
* @subpackage UnitTests
* @author Gunnar Wrobel
* @license http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link http://pear.horde.org/index.php?package=Qc
+ * @link http://pear.horde.org/index.php?package=Element
*/
-class Horde_Qc_StoryTestCase
+class Horde_Element_StoryTestCase
extends PHPUnit_Extensions_Story_TestCase
{
/**
@@ -42,7 +42,7 @@ extends PHPUnit_Extensions_Story_TestCase
public function runGiven(&$world, $action, $arguments)
{
switch($action) {
- case 'the default QC package setup':
+ case 'the default Element setup':
break;
default:
return $this->notImplemented($action);
@@ -63,14 +63,14 @@ extends PHPUnit_Extensions_Story_TestCase
switch($action) {
case 'calling the package with the help option':
$_SERVER['argv'] = array(
- 'hqc',
+ 'horde-element',
'--help',
dirname(__FILE__) . '/fixture'
);
ob_start();
$parameters = array();
- $parameters['cli']['parser']['class'] = 'Horde_Qc_Stub_Parser';
- Horde_Qc::main($parameters);
+ $parameters['cli']['parser']['class'] = 'Horde_Element_Stub_Parser';
+ Horde_Element::main($parameters);
$world['output'] = ob_get_contents();
ob_end_clean();
break;
diff --git a/framework/Qc/test/Horde/Qc/Stub/Parser.php b/framework/Element/test/Horde/Element/Stub/Parser.php
similarity index 82%
rename from framework/Qc/test/Horde/Qc/Stub/Parser.php
rename to framework/Element/test/Horde/Element/Stub/Parser.php
index 44303cd29..e704661fa 100644
--- a/framework/Qc/test/Horde/Qc/Stub/Parser.php
+++ b/framework/Element/test/Horde/Element/Stub/Parser.php
@@ -1,5 +1,5 @@