Updated package.xml and some phpdoc.
authorGunnar Wrobel <p@rdus.de>
Wed, 17 Nov 2010 15:30:46 +0000 (16:30 +0100)
committerGunnar Wrobel <p@rdus.de>
Tue, 30 Nov 2010 12:48:25 +0000 (13:48 +0100)
framework/Secret/package.xml
framework/Secret/test/Horde/Secret/AllTests.php
framework/Secret/test/Horde/Secret/Autoload.php
framework/Secret/test/Horde/Secret/Class/SecretTest.php [deleted file]
framework/Secret/test/Horde/Secret/Unit/SecretTest.php [new file with mode: 0644]

index ae9aaaf..28cce41 100644 (file)
@@ -1,13 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<package packagerversion="1.4.9" 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">
+<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>Secret</name>
  <channel>pear.horde.org</channel>
  <summary>Secret Encryption API</summary>
- <description>The Horde_Secret:: package provides an API for encrypting and decrypting small pieces of data with the use of a shared key.
- </description>
+ <description>The Horde_Secret:: package provides an API for encrypting and decrypting small pieces of data with the use of a shared key.</description>
  <lead>
   <name>Chuck Hagenbuch</name>
   <user>chuck</user>
@@ -20,7 +16,8 @@ http://pear.php.net/dtd/package-2.0.xsd">
   <email>slusarz@horde.org</email>
   <active>yes</active>
  </lead>
- <date>2010-03-19</date>
+ <date>2010-11-17</date>
+ <time>16:28:13</time>
  <version>
   <release>0.1.0</release>
   <api>0.1.0</api>
@@ -30,13 +27,14 @@ http://pear.php.net/dtd/package-2.0.xsd">
   <api>beta</api>
  </stability>
  <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
- <notes>* Remove dependency on Horde_Core.
+ <notes>
+* Remove dependency on Horde_Core.
  * Throw exceptions on error.
  * Convert to OO-interface.
- * Use PEAR's Crypt_Blowfish to encrypt data.
+ * Use PEAR&apos;s Crypt_Blowfish to encrypt data.
  </notes>
  <contents>
-  <dir name="/">
+  <dir baseinstalldir="/" name="/">
    <dir name="lib">
     <dir name="Horde">
      <dir name="Secret">
@@ -45,6 +43,18 @@ http://pear.php.net/dtd/package-2.0.xsd">
      <file name="Secret.php" role="php" />
     </dir> <!-- /lib/Horde -->
    </dir> <!-- /lib -->
+   <dir name="test">
+    <dir name="Horde">
+     <dir name="Secret">
+      <dir name="Unit">
+       <file name="SecretTest.php" role="test" />
+      </dir> <!-- /test/Horde/Secret/Unit -->
+      <file name="AllTests.php" role="test" />
+      <file name="Autoload.php" role="test" />
+      <file name="phpunit.xml" role="test" />
+     </dir> <!-- /test/Horde/Secret -->
+    </dir> <!-- /test/Horde -->
+   </dir> <!-- /test -->
   </dir> <!-- / -->
  </contents>
  <dependencies>
@@ -68,23 +78,29 @@ http://pear.php.net/dtd/package-2.0.xsd">
  </dependencies>
  <phprelease>
   <filelist>
-      <install name="lib/Horde/Secret/Exception.php" as="Horde/Secret/Exception.php" />
-   <install name="lib/Horde/Secret.php" as="Horde/Secret.php" />
+   <install as="Horde/Secret.php" name="lib/Horde/Secret.php" />
+   <install as="Horde/Secret/Exception.php" name="lib/Horde/Secret/Exception.php" />
+   <install as="Horde/Secret/AllTests.php" name="test/Horde/Secret/AllTests.php" />
+   <install as="Horde/Secret/Autoload.php" name="test/Horde/Secret/Autoload.php" />
+   <install as="Horde/Secret/phpunit.xml" name="test/Horde/Secret/phpunit.xml" />
+   <install as="Horde/Secret/Unit/SecretTest.php" name="test/Horde/Secret/Unit/SecretTest.php" />
   </filelist>
  </phprelease>
  <changelog>
   <release>
-   <date>2008-12-11</date>
    <version>
-    <release>0.0.3</release>
-    <api>0.0.2</api>
+    <release>0.0.1</release>
+    <api>0.0.1</api>
    </version>
    <stability>
     <release>alpha</release>
     <api>alpha</api>
    </stability>
+   <date>2003-07-05</date>
    <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
-   <notes>* Initial Horde 4 package.</notes>
+   <notes>
+Initial release as a PEAR package
+   </notes>
   </release>
   <release>
    <date>2006-05-08</date>
@@ -98,22 +114,42 @@ http://pear.php.net/dtd/package-2.0.xsd">
     <api>alpha</api>
    </stability>
    <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
-   <notes>- Converted to package.xml 2.0 for pear.horde.org
+   <notes>
+- Converted to package.xml 2.0 for pear.horde.org
 - Return false instead of generating encryption errors if $key is empty (Bug #5925).
    </notes>
   </release>
   <release>
+   <date>2008-12-11</date>
    <version>
-    <release>0.0.1</release>
-    <api>0.0.1</api>
+    <release>0.0.3</release>
+    <api>0.0.2</api>
    </version>
    <stability>
     <release>alpha</release>
     <api>alpha</api>
    </stability>
-   <date>2003-07-05</date>
    <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
-   <notes>Initial release as a PEAR package
+   <notes>
+* Initial Horde 4 package.
+   </notes>
+  </release>
+  <release>
+   <version>
+    <release>0.1.0</release>
+    <api>0.1.0</api>
+   </version>
+   <stability>
+    <release>beta</release>
+    <api>beta</api>
+   </stability>
+   <date>2010-11-17</date>
+   <license uri="http://www.gnu.org/copyleft/lesser.html">LGPL</license>
+   <notes>
+* Remove dependency on Horde_Core.
+ * Throw exceptions on error.
+ * Convert to OO-interface.
+ * Use PEAR&apos;s Crypt_Blowfish to encrypt data.
    </notes>
   </release>
  </changelog>
index 1d6e62d..43c4d54 100644 (file)
@@ -2,11 +2,14 @@
 /**
  * All tests for the Horde_Secret package.
  *
- * @category Horde
- * @package  Secret
- * @author   Michael Slusarz <slusarz@horde.org>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Secret
+ * PHP version 5
+ *
+ * @category   Horde
+ * @package    Secret
+ * @subpackage UnitTests
+ * @author     Michael Slusarz <slusarz@horde.org>
+ * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link       http://pear.horde.org/index.php?package=Secret
  */
 
 /**
index b617b13..95d230d 100644 (file)
@@ -2,28 +2,20 @@
 /**
  * Setup autoloading for the tests.
  *
- * @category Horde
- * @package  Secret
- * @author   Michael Slusarz <slusarz@horde.org>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Secret
+ * PHP version 5
+ *
+ * @category   Horde
+ * @package    Secret
+ * @subpackage UnitTests
+ * @author     Michael Slusarz <slusarz@horde.org>
+ * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link       http://pear.horde.org/index.php?package=Secret
  */
 
-if (!spl_autoload_functions()) {
-    spl_autoload_register(
-        create_function(
-            '$class',
-            '$filename = str_replace(array(\'::\', \'_\'), \'/\', $class);'
-            . '$err_mask = E_ALL ^ E_WARNING;'
-            . '$oldErrorReporting = error_reporting($err_mask);'
-            . 'include "$filename.php";'
-            . 'error_reporting($oldErrorReporting);'
-        )
-    );
-}
+require_once 'Horde/Test/Autoload.php';
 
 /** Catch strict standards */
 error_reporting(E_ALL | E_STRICT);
 
 /** Needed for PEAR_Error. */
-@require_once 'PEAR.php';
+require_once 'PEAR.php';
diff --git a/framework/Secret/test/Horde/Secret/Class/SecretTest.php b/framework/Secret/test/Horde/Secret/Class/SecretTest.php
deleted file mode 100644 (file)
index 0f99ba7..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-/**
- * Test the secret class.
- *
- * @category Horde
- * @package  Secret
- * @author   Michael Slusarz <slusarz@horde.org>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Secret
- */
-
-/**
- * Prepare the test setup.
- */
-require_once dirname(__FILE__) . '/../Autoload.php';
-
-/**
- * Test the secret class.
- *
- * Copyright 2009-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  Secret
- * @author   Michael Slusarz <slusarz@horde.org>
- * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
- * @link     http://pear.horde.org/index.php?package=Secret
- */
-
-class Horde_Secret_Class_SecretTest extends PHPUnit_Framework_TestCase
-{
-    public function test8BitKey()
-    {
-        $secret = new Horde_Secret();
-
-        $key = "\x88";
-        $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
-
-        $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
-    }
-
-    public function test64BitKey()
-    {
-        $secret = new Horde_Secret();
-
-        $key = "\x00\x00\x00\x00\x00\x00\x00\x00";
-        $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
-
-        $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
-    }
-
-    public function test128BitKey()
-    {
-        $secret = new Horde_Secret();
-
-        $key = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F";
-        $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
-
-        $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
-    }
-
-}
diff --git a/framework/Secret/test/Horde/Secret/Unit/SecretTest.php b/framework/Secret/test/Horde/Secret/Unit/SecretTest.php
new file mode 100644 (file)
index 0000000..7d988c8
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Test the secret class.
+ *
+ * PHP version 5
+ *
+ * @category   Horde
+ * @package    Secret
+ * @subpackage UnitTests
+ * @author     Michael Slusarz <slusarz@horde.org>
+ * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link       http://pear.horde.org/index.php?package=Secret
+ */
+
+/**
+ * Prepare the test setup.
+ */
+require_once dirname(__FILE__) . '/../Autoload.php';
+
+/**
+ * Test the secret class.
+ *
+ * Copyright 2009-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    Secret
+ * @subpackage UnitTests
+ * @author     Michael Slusarz <slusarz@horde.org>
+ * @license    http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link       http://pear.horde.org/index.php?package=Secret
+ */
+
+class Horde_Secret_Unit_SecretTest extends PHPUnit_Framework_TestCase
+{
+    public function test8BitKey()
+    {
+        $secret = new Horde_Secret();
+
+        $key = "\x88";
+        $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
+
+        $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
+    }
+
+    public function test64BitKey()
+    {
+        $secret = new Horde_Secret();
+
+        $key = "\x00\x00\x00\x00\x00\x00\x00\x00";
+        $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
+
+        $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
+    }
+
+    public function test128BitKey()
+    {
+        $secret = new Horde_Secret();
+
+        $key = "\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0A\x0B\x0C\x0D\x0E\x0F";
+        $plaintext = "\x00\x00\x00\x00\x00\x00\x00\x00";
+
+        $this->assertEquals($plaintext, $secret->read($key, $secret->write($key, $plaintext)));
+    }
+
+}