horde.git
16 years agoWe have to use the full tag name (including namespace) when calling
Jan Schneider [Mon, 5 Oct 2009 16:35:16 +0000 (18:35 +0200)]
We have to use the full tag name (including namespace) when calling
createElementNS() or setAttributeNS().

16 years agoAdd test for unsetting namespaced attributes.
Jan Schneider [Mon, 5 Oct 2009 16:34:03 +0000 (18:34 +0200)]
Add test for unsetting namespaced attributes.

16 years agoFix variable name.
Jan Schneider [Mon, 5 Oct 2009 16:20:14 +0000 (18:20 +0200)]
Fix variable name.

16 years agoChange method names to reflect what the actually test.
Jan Schneider [Mon, 5 Oct 2009 16:19:31 +0000 (18:19 +0200)]
Change method names to reflect what the actually test.
Add tests for element setter/getter.
Fix order of assertEquals() arguments.

16 years agoRemove references, consolidate includes
Chuck Hagenbuch [Sun, 4 Oct 2009 03:10:49 +0000 (23:10 -0400)]
Remove references, consolidate includes

16 years agoStub out gettext functions if they don't exist to avoid fatal errors in tests.
Chuck Hagenbuch [Sun, 4 Oct 2009 02:57:40 +0000 (22:57 -0400)]
Stub out gettext functions if they don't exist to avoid fatal errors in tests.

16 years agoRemove a bunch of references, a little PHP 5 style, mark tests skipped that
Chuck Hagenbuch [Sun, 4 Oct 2009 02:56:57 +0000 (22:56 -0400)]
Remove a bunch of references, a little PHP 5 style, mark tests skipped that
currently throw errors.

16 years agoskip tests that don't work because $world['auth'] doesn't exist yet
Chuck Hagenbuch [Sun, 4 Oct 2009 01:32:09 +0000 (21:32 -0400)]
skip tests that don't work because $world['auth'] doesn't exist yet

16 years agoDeclare static public.
Gunnar Wrobel [Fri, 2 Oct 2009 19:17:05 +0000 (21:17 +0200)]
Declare static public.

16 years agoHotfix structure class construction. A real fix will come later.
Gunnar Wrobel [Fri, 2 Oct 2009 19:16:08 +0000 (21:16 +0200)]
Hotfix structure class construction. A real fix will come later.

16 years agoFix the Kolab_Server factory. Accepting arbitrary class names in the factory is not...
Gunnar Wrobel [Fri, 2 Oct 2009 18:59:29 +0000 (20:59 +0200)]
Fix the Kolab_Server factory. Accepting arbitrary class names in the factory is not required.

16 years agoFix more errors when running tests in strict mode.
Gunnar Wrobel [Fri, 2 Oct 2009 18:47:32 +0000 (20:47 +0200)]
Fix more errors when running tests in strict mode.

16 years agoAdd a text that gives some background on dependency injection and provides a few...
Gunnar Wrobel [Fri, 2 Oct 2009 13:41:12 +0000 (15:41 +0200)]
Add a text that gives some background on dependency injection and provides a few examples.

16 years agoSome example of how to use Horde_Injector.
Gunnar Wrobel [Fri, 2 Oct 2009 13:40:33 +0000 (15:40 +0200)]
Some example of how to use Horde_Injector.

16 years agoPhpdoc.
Gunnar Wrobel [Fri, 2 Oct 2009 13:40:09 +0000 (15:40 +0200)]
Phpdoc.

16 years agoFix more referencing problems for the strict tests.
Gunnar Wrobel [Fri, 2 Oct 2009 09:38:47 +0000 (11:38 +0200)]
Fix more referencing problems for the strict tests.

16 years agotest_framework now takes all PHPUnit command line arguments
Chuck Hagenbuch [Fri, 2 Oct 2009 03:00:54 +0000 (23:00 -0400)]
test_framework now takes all PHPUnit command line arguments

16 years agoinitialize $changes array
Chuck Hagenbuch [Fri, 2 Oct 2009 02:41:17 +0000 (22:41 -0400)]
initialize $changes array

16 years agoThere is no $new_info variable in this function - $info looks like the only alternative.
Chuck Hagenbuch [Fri, 2 Oct 2009 02:40:03 +0000 (22:40 -0400)]
There is no $new_info variable in this function - $info looks like the only alternative.

16 years agowhitespace
Chuck Hagenbuch [Fri, 2 Oct 2009 02:39:55 +0000 (22:39 -0400)]
whitespace

16 years agoremove more references
Chuck Hagenbuch [Fri, 2 Oct 2009 02:12:15 +0000 (22:12 -0400)]
remove more references

16 years agoAvoid "only variables should be passed by reference" warnings
Chuck Hagenbuch [Fri, 2 Oct 2009 02:11:37 +0000 (22:11 -0400)]
Avoid "only variables should be passed by reference" warnings

16 years agoRemove unnecessary references
Chuck Hagenbuch [Fri, 2 Oct 2009 00:59:09 +0000 (20:59 -0400)]
Remove unnecessary references

16 years agowhitespace
Chuck Hagenbuch [Fri, 2 Oct 2009 00:45:36 +0000 (20:45 -0400)]
whitespace

16 years agosplit() is deprecated; use explode()
Chuck Hagenbuch [Fri, 2 Oct 2009 00:45:17 +0000 (20:45 -0400)]
split() is deprecated; use explode()

16 years agoDon't throw notices if the log event doesn't have a field that the filter has a
Chuck Hagenbuch [Fri, 2 Oct 2009 00:42:43 +0000 (20:42 -0400)]
Don't throw notices if the log event doesn't have a field that the filter has a
constraint for.

16 years agoAvoid calling set_magic_quotes_runtime if magic_quotes_runtime wasn't on.
Chuck Hagenbuch [Fri, 2 Oct 2009 00:42:11 +0000 (20:42 -0400)]
Avoid calling set_magic_quotes_runtime if magic_quotes_runtime wasn't on.

16 years agoremove references that cause "only variables should assgned by reference" errors
Chuck Hagenbuch [Thu, 1 Oct 2009 22:36:12 +0000 (18:36 -0400)]
remove references that cause "only variables should assgned by reference" errors

16 years agofix variable name typo
Chuck Hagenbuch [Thu, 1 Oct 2009 20:38:55 +0000 (16:38 -0400)]
fix variable name typo

16 years agoActually, use the 'headers' option to add the headers, to make it
Michael J. Rubinsky [Fri, 2 Oct 2009 00:56:58 +0000 (20:56 -0400)]
Actually, use the 'headers' option to add the headers, to make it
clearer why they can't be set before setOptions()

16 years agoAdd headers after other values are set, otherwise they get overwritten.
Michael J. Rubinsky [Fri, 2 Oct 2009 00:48:37 +0000 (20:48 -0400)]
Add headers after other values are set, otherwise they get overwritten.

16 years agoRemove @since
Michael J. Rubinsky [Tue, 29 Sep 2009 19:40:42 +0000 (15:40 -0400)]
Remove @since

16 years agoPreserve entities in HTML output
Michael M Slusarz [Thu, 1 Oct 2009 19:27:19 +0000 (13:27 -0600)]
Preserve entities in HTML output

16 years ago- make constructors consistent across Request types
Chuck Hagenbuch [Thu, 1 Oct 2009 18:42:58 +0000 (14:42 -0400)]
- make constructors consistent across Request types
- consistently try to set proxy settings across Request types
- condense code in Curl and Peclhttp requests for translating between our constants and theirs

16 years agoAdd HTTP auth support. All adapters support BASIC; Curl and Peclhttp support a bunch...
Chuck Hagenbuch [Thu, 1 Oct 2009 17:42:53 +0000 (13:42 -0400)]
Add HTTP auth support. All adapters support BASIC; Curl and Peclhttp support a bunch more.

16 years agoAdd getIPAddress() (Bug #8620).
Jan Schneider [Thu, 1 Oct 2009 13:37:37 +0000 (15:37 +0200)]
Add getIPAddress() (Bug #8620).

16 years agoFix ngettext() calls, use date format parameter, use time format parameter.
Jan Schneider [Mon, 28 Sep 2009 13:20:07 +0000 (15:20 +0200)]
Fix ngettext() calls, use date format parameter, use time format parameter.

16 years agorefactor Horde_Feed tests for recent changes
Chuck Hagenbuch [Wed, 30 Sep 2009 04:15:39 +0000 (00:15 -0400)]
refactor Horde_Feed tests for recent changes

16 years agoRefactor Horde_Feed to remove the static HTTP client, and to inject it
Chuck Hagenbuch [Wed, 30 Sep 2009 04:14:38 +0000 (00:14 -0400)]
Refactor Horde_Feed to remove the static HTTP client, and to inject it
instead. Also use the method override support in the HTTP client instead of
hardcoding it at the feed level.

16 years agoAdd support for http method overriding to the HTTP client. possibly should go in
Chuck Hagenbuch [Wed, 30 Sep 2009 04:12:48 +0000 (00:12 -0400)]
Add support for http method overriding to the HTTP client. possibly should go in
a subclass or decorator instead.

     /**
+     * Use POST instead of PUT and DELETE, sending X-HTTP-Method-Override with
+     * the intended method name instead.
+     *
+     * @var boolean
+     */
+    protected $_httpMethodOverride = false;
+
+    /**
      * Horde_Http_Client constructor.
      *
      * @param array $args Any Http_Client settings to initialize in the
      * constructor. Available settings are:
+     *     client.httpMethodOverride
      *     client.proxyServer
      *     client.proxyUser
      *     client.proxyPass
@@ -62,7 +71,12 @@ class Horde_Http_Client

         foreach ($args as $key => $val) {
             list($object, $objectkey) = explode('.', $key, 2);
-            $this->$object->$objectkey = $val;
+            if ($object == 'request') {
+                $this->$object->$objectkey = $val;
+            } elseif ($object == 'client') {
+                $objectKey = '_' . $objectKey;
+                $this->$objectKey = $val;
+            }
         }
     }

@@ -93,7 +107,11 @@ class Horde_Http_Client
      */
     public function put($uri = null, $data = null, $headers = array())
     {
-        /* @TODO suport method override (X-Method-Override: PUT). */
+        if ($this->_httpMethodOverride) {
+            $headers = array_merge(array('X-HTTP-Method-Override' => 'PUT'), $headers);
+            return $this->post($uri, $data, $headers);
+        }
+
         return $this->request('PUT', $uri, $data, $headers);
     }

@@ -104,7 +122,11 @@ class Horde_Http_Client
      */
     public function delete($uri = null, $headers = array())
     {
-        /* @TODO suport method override (X-Method-Override: DELETE). */
+        if ($this->_httpMethodOverride) {
+            $headers = array_merge(array('X-HTTP-Method-Override' => 'DELETE'), $headers);
+            return $this->post($uri, null, $headers);
+        }
+
         return $this->request('DELETE', $uri, null, $headers);
     }

16 years agoMerge branch 'framework_history_mock'
Gunnar Wrobel [Tue, 29 Sep 2009 21:21:46 +0000 (23:21 +0200)]
Merge branch 'framework_history_mock'

16 years agoImap Client test fixes
Michael M Slusarz [Tue, 29 Sep 2009 19:29:39 +0000 (13:29 -0600)]
Imap Client test fixes

Only do MODSEQ search if CONDSTORE is available.
Make the interval search give a bit more relevant results (small
timestamp could result in same day search, which is not useful for
eyeballing during testing)

16 years agoIn an OR clause, 2nd element must not contain the OR search key
Michael M Slusarz [Tue, 29 Sep 2009 19:02:34 +0000 (13:02 -0600)]
In an OR clause, 2nd element must not contain the OR search key

16 years agoAdd a Horde identifier to the generated Message-ID
Michael M Slusarz [Tue, 29 Sep 2009 06:27:22 +0000 (00:27 -0600)]
Add a Horde identifier to the generated Message-ID

16 years agoFix signatures for strict mode testing.
Gunnar Wrobel [Tue, 29 Sep 2009 17:46:03 +0000 (19:46 +0200)]
Fix signatures for strict mode testing.

16 years agoThese test suites need to not throw warnings when autoloading, so use the same
Chuck Hagenbuch [Tue, 29 Sep 2009 17:31:05 +0000 (13:31 -0400)]
These test suites need to not throw warnings when autoloading, so use the same
logic we do in Horde_Autoloader. Also include PHPUnit/Framework.php.

16 years agoWe never want to autoload the CacheMock class
Chuck Hagenbuch [Tue, 29 Sep 2009 17:30:24 +0000 (13:30 -0400)]
We never want to autoload the CacheMock class

16 years ago- include PHPUnit/Framework.php
Chuck Hagenbuch [Tue, 29 Sep 2009 17:24:29 +0000 (13:24 -0400)]
- include PHPUnit/Framework.php
- don't use include_once or silence calls in on-the-fly autoloader

16 years agoThis asserting was testing PHPUnit internals unintentionally. Remove it.
Chuck Hagenbuch [Tue, 29 Sep 2009 17:23:30 +0000 (13:23 -0400)]
This asserting was testing PHPUnit internals unintentionally. Remove it.

16 years agoDeactivate the sqlite based testing now and only run the test suite over the mock...
Gunnar Wrobel [Tue, 29 Sep 2009 15:53:01 +0000 (17:53 +0200)]
Deactivate the sqlite based testing now and only run the test suite over the mock driver.

16 years agoComplete testing.
Gunnar Wrobel [Tue, 29 Sep 2009 15:43:59 +0000 (17:43 +0200)]
Complete testing.

16 years agoThe mock driver.
Gunnar Wrobel [Tue, 29 Sep 2009 15:23:36 +0000 (17:23 +0200)]
The mock driver.

16 years agoAdd initial Date helper ported from Mad. Needs translation.
Chuck Hagenbuch [Tue, 29 Sep 2009 14:00:27 +0000 (10:00 -0400)]
Add initial Date helper ported from Mad. Needs translation.

16 years agoInclude PHPUnit/Framework.php
Chuck Hagenbuch [Tue, 29 Sep 2009 13:58:53 +0000 (09:58 -0400)]
Include PHPUnit/Framework.php

16 years agoAdd a smart quotes helper to Horde_View_Helper_Text. Probably belongs in Horde_Text_F...
Chuck Hagenbuch [Tue, 29 Sep 2009 13:50:37 +0000 (09:50 -0400)]
Add a smart quotes helper to Horde_View_Helper_Text. Probably belongs in Horde_Text_Filter?

16 years agoRequire PHPUnit/Framework.php and put autoloading back in its original place
Chuck Hagenbuch [Tue, 29 Sep 2009 13:32:35 +0000 (09:32 -0400)]
Require PHPUnit/Framework.php and put autoloading back in its original place

16 years agoFix MySQL tests to match new primary key definition
Chuck Hagenbuch [Tue, 29 Sep 2009 13:24:13 +0000 (09:24 -0400)]
Fix MySQL tests to match new primary key definition

16 years agoFigured out why I was getting errors; include PHPUnit/Framework.php
Chuck Hagenbuch [Tue, 29 Sep 2009 13:27:05 +0000 (09:27 -0400)]
Figured out why I was getting errors; include PHPUnit/Framework.php

16 years agoFix and test error handling of the class.
Gunnar Wrobel [Tue, 29 Sep 2009 13:04:10 +0000 (15:04 +0200)]
Fix and test error handling of the class.

16 years agoAlready provided by the base class.
Gunnar Wrobel [Tue, 29 Sep 2009 12:06:14 +0000 (14:06 +0200)]
Already provided by the base class.

16 years agoAllow different history drivers. This still uses Horde_History as a base class. It...
Gunnar Wrobel [Tue, 29 Sep 2009 11:53:51 +0000 (13:53 +0200)]
Allow different history drivers. This still uses Horde_History as a base class. It might be better to use Horde_History_Base but I wanted to keep the API 100% intact for now.

16 years agoFix paths to KolabScenarioTest.php and KolabTest.php
Matt Selsky [Tue, 29 Sep 2009 08:00:59 +0000 (04:00 -0400)]
Fix paths to KolabScenarioTest.php and KolabTest.php

16 years agoAdd a test suite to Horde_History. It does the db testing based on
Gunnar Wrobel [Tue, 29 Sep 2009 05:53:12 +0000 (07:53 +0200)]
Add a test suite to Horde_History. It does the db testing based on
sqlite which is suboptimal but I want a decent code coverage before
working on the package.

I will add a mock driver now and at a later timepoint there might be a
Kolab specific driver.

Once the mock driver is available the db testing will be turned off.

16 years agoTweak ZIP display a bit
Michael M Slusarz [Mon, 28 Sep 2009 05:40:19 +0000 (23:40 -0600)]
Tweak ZIP display a bit

16 years agouse class constants here as well
Michael J. Rubinsky [Mon, 28 Sep 2009 20:29:17 +0000 (16:29 -0400)]
use class constants here as well

16 years agoUse exceptions from Horde_Lock
Michael J. Rubinsky [Mon, 28 Sep 2009 20:20:56 +0000 (16:20 -0400)]
Use exceptions from Horde_Lock

16 years agoUse Exceptions
Michael J. Rubinsky [Mon, 28 Sep 2009 20:08:07 +0000 (16:08 -0400)]
Use Exceptions

16 years agoFix classname in unit tests. Please run these when changing the Db package!
Chuck Hagenbuch [Mon, 28 Sep 2009 19:20:08 +0000 (15:20 -0400)]
Fix classname in unit tests. Please run these when changing the Db package!

16 years agoRework the Constraint filter to take a coupler (an And constraint or an Or
Chuck Hagenbuch [Mon, 28 Sep 2009 18:54:06 +0000 (14:54 -0400)]
Rework the Constraint filter to take a coupler (an And constraint or an Or
constraint) as the default when adding multiple constraints to a field.

16 years agoRename Horde_Constraint_Compound to Horde_Constraint_Coupler
Chuck Hagenbuch [Mon, 28 Sep 2009 18:46:19 +0000 (14:46 -0400)]
Rename Horde_Constraint_Compound to Horde_Constraint_Coupler

16 years agoremove bad method declaration
Chuck Hagenbuch [Mon, 28 Sep 2009 18:33:43 +0000 (14:33 -0400)]
remove bad method declaration

16 years agoRevert "add constraint coupler to separate object creation from logic classes"
Chuck Hagenbuch [Mon, 28 Sep 2009 18:28:42 +0000 (14:28 -0400)]
Revert "add constraint coupler to separate object creation from logic classes"

This reverts commit 360abb926cba981e5aa2eba66129a7815004ef1a.

16 years agoUse addConstraint() in the compound constraint constructor
Chuck Hagenbuch [Mon, 28 Sep 2009 18:26:43 +0000 (14:26 -0400)]
Use addConstraint() in the compound constraint constructor
Collapse compound constraints of the same type

16 years agoAdd Horde_Lock to git.
Michael J. Rubinsky [Mon, 28 Sep 2009 17:56:29 +0000 (13:56 -0400)]
Add Horde_Lock to git.

16 years agoSet the include_path to include the default lib/ directory when running tests
Chuck Hagenbuch [Mon, 28 Sep 2009 15:54:23 +0000 (11:54 -0400)]
Set the include_path to include the default lib/ directory when running tests

16 years agoChange test helper method name to avoid conflicts with PHPUnit's throwException method
Chuck Hagenbuch [Mon, 28 Sep 2009 15:44:03 +0000 (11:44 -0400)]
Change test helper method name to avoid conflicts with PHPUnit's throwException method

16 years agoRemove references (&) that throw E_DEPRECATED errors
Chuck Hagenbuch [Mon, 28 Sep 2009 15:40:44 +0000 (11:40 -0400)]
Remove references (&) that throw E_DEPRECATED errors

16 years agoFix tests.
Jan Schneider [Fri, 25 Sep 2009 16:17:24 +0000 (18:17 +0200)]
Fix tests.

16 years agoAllow to load test suite dependencies from test suites in other packages. In addition...
Gunnar Wrobel [Mon, 28 Sep 2009 09:18:58 +0000 (11:18 +0200)]
Allow to load test suite dependencies from test suites in other packages. In addition fix the test suites so that they can be loaded again. The tests themselves still need some cleanup.

16 years agoWe should only be matching url:script inside of HTML tags
Michael M Slusarz [Mon, 28 Sep 2009 05:10:54 +0000 (23:10 -0600)]
We should only be matching url:script inside of HTML tags

Ticket #8592

16 years agoFix path.
Michael M Slusarz [Mon, 28 Sep 2009 05:10:44 +0000 (23:10 -0600)]
Fix path.

16 years agoOnly deal with base tags when viewing inline
Michael M Slusarz [Mon, 28 Sep 2009 04:17:00 +0000 (22:17 -0600)]
Only deal with base tags when viewing inline

16 years agoDon't strip style attributes if not viewing inline
Michael M Slusarz [Sun, 27 Sep 2009 17:44:58 +0000 (11:44 -0600)]
Don't strip style attributes if not viewing inline

16 years agoAdd the headers array to the Curl request
Michael J. Rubinsky [Sun, 27 Sep 2009 17:11:30 +0000 (13:11 -0400)]
Add the headers array to the Curl request

16 years agofix Curl requests defaulting to POST instead of GET (and otherwise ignoring the
Chuck Hagenbuch [Sun, 27 Sep 2009 16:25:10 +0000 (12:25 -0400)]
fix Curl requests defaulting to POST instead of GET (and otherwise ignoring the
request method)

16 years agoMove automatic request object generation to a factory method
Chuck Hagenbuch [Sun, 27 Sep 2009 16:24:20 +0000 (12:24 -0400)]
Move automatic request object generation to a factory method

16 years agoadd constraint coupler to separate object creation from logic classes
James Pepin [Sun, 27 Sep 2009 02:30:14 +0000 (22:30 -0400)]
add constraint coupler to separate object creation from logic classes

16 years agoreturn $this from add* methods to allow method chaining
James Pepin [Sun, 27 Sep 2009 01:29:14 +0000 (21:29 -0400)]
return $this from add* methods to allow method chaining

16 years agoAdd a Constraint-based log filter
Chuck Hagenbuch [Sat, 26 Sep 2009 03:39:17 +0000 (23:39 -0400)]
Add a Constraint-based log filter

16 years agoadd new Horde_Constraint package for building up constraint sets
Chuck Hagenbuch [Sat, 26 Sep 2009 03:15:35 +0000 (23:15 -0400)]
add new Horde_Constraint package for building up constraint sets

16 years agoautoload PHPUnit classes
Chuck Hagenbuch [Sat, 26 Sep 2009 03:39:57 +0000 (23:39 -0400)]
autoload PHPUnit classes

16 years agoFix .gitignore to only ignore lib/ and libs/ directories, and only the top-level...
Chuck Hagenbuch [Fri, 25 Sep 2009 20:15:21 +0000 (16:15 -0400)]
Fix .gitignore to only ignore lib/ and libs/ directories, and only the top-level ones.

16 years agoFirst attempt at optional caching of Horde_Routes generated mappings (Request #8563).
Chuck Hagenbuch [Fri, 25 Sep 2009 20:07:52 +0000 (16:07 -0400)]
First attempt at optional caching of Horde_Routes generated mappings (Request #8563).

16 years agouse bin/ as a consistent dir name
Chuck Hagenbuch [Fri, 25 Sep 2009 20:07:24 +0000 (16:07 -0400)]
use bin/ as a consistent dir name

16 years agomake this a working phpunit test
Chuck Hagenbuch [Fri, 25 Sep 2009 17:50:32 +0000 (13:50 -0400)]
make this a working phpunit test

16 years agoautoload phpunit classes
Chuck Hagenbuch [Fri, 25 Sep 2009 17:50:22 +0000 (13:50 -0400)]
autoload phpunit classes

16 years agoUse include_once in these autoload stub functions for safety.
Chuck Hagenbuch [Fri, 25 Sep 2009 17:31:03 +0000 (13:31 -0400)]
Use include_once in these autoload stub functions for safety.

16 years agotweak hasLevel() and use it in addLevel()
Chuck Hagenbuch [Fri, 25 Sep 2009 17:12:07 +0000 (13:12 -0400)]
tweak hasLevel() and use it in addLevel()

16 years agoMove phishing highlighting CSS into driver (needed since output might be in an IFRAME...
Michael M Slusarz [Fri, 25 Sep 2009 17:10:08 +0000 (11:10 -0600)]
Move phishing highlighting CSS into driver (needed since output might be in an IFRAME; Add 'phishing' parameter

16 years agoMake arguments optional (Bug #8601).
Jan Schneider [Fri, 25 Sep 2009 14:18:50 +0000 (16:18 +0200)]
Make arguments optional (Bug #8601).