Hello community,
here is the log from the commit of package php5-pear-Horde_Constraint for openSUSE:Factory checked in at 2015-01-20 19:02:11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/php5-pear-Horde_Constraint (Old)
and /work/SRC/openSUSE:Factory/.php5-pear-Horde_Constraint.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "php5-pear-Horde_Constraint"
Changes:
--------
--- /work/SRC/openSUSE:Factory/php5-pear-Horde_Constraint/php5-pear-Horde_Constraint.changes 2012-11-28 13:41:59.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.php5-pear-Horde_Constraint.new/php5-pear-Horde_Constraint.changes 2015-01-20 19:02:12.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Jan 8 17:43:45 UTC 2015 -
+
+- Version 2.0.2
+- [jan] Add Composer definition.
+
+-------------------------------------------------------------------
Old:
----
Horde_Constraint-2.0.1.tgz
New:
----
Horde_Constraint-2.0.2.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ php5-pear-Horde_Constraint.spec ++++++
--- /var/tmp/diff_new_pack.vMrkUA/_old 2015-01-20 19:02:13.000000000 +0100
+++ /var/tmp/diff_new_pack.vMrkUA/_new 2015-01-20 19:02:13.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package php5-pear-Horde_Constraint
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 Ralf Lang.
#
# All modifications and additions to the file contributed by third parties
@@ -23,7 +23,7 @@
Name: php5-pear-Horde_Constraint
%define pear_name Horde_Constraint
%define pear_sname horde_constraint
-Version: 2.0.1
+Version: 2.0.2
Release: 0
Source0: http://pear.horde.org/get/Horde_Constraint-%{version}.tgz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
++++++ Horde_Constraint-2.0.1.tgz -> Horde_Constraint-2.0.2.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/doc/Horde/Constraint/COPYING new/Horde_Constraint-2.0.1/doc/Horde/Constraint/COPYING
--- old/Horde_Constraint-2.0.1/doc/Horde/Constraint/COPYING 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/doc/Horde/Constraint/COPYING 1970-01-01 01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
- Copyright 1999-2012 Horde LLC. All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are
-met:
-
- - Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
-
- - Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE HORDE PROJECT
-OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysFalse.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysFalse.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysFalse.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysFalse.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-
- */
-class Horde_Constraint_AlwaysFalse implements Horde_Constraint
-{
- public function evaluate($value)
- {
- return false;
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysTrue.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysTrue.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysTrue.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysTrue.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-
- */
-class Horde_Constraint_AlwaysTrue implements Horde_Constraint
-{
- public function evaluate($value)
- {
- return true;
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/And.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/And.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/And.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/And.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-
- */
-class Horde_Constraint_And extends Horde_Constraint_Coupler
-{
- public function evaluate($value)
- {
- foreach ($this->_constraints as $c) {
- if (!$c->evaluate($value)) {
- return false;
- }
- }
- return true;
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/Coupler.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Coupler.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/Coupler.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Coupler.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-
- */
-abstract class Horde_Constraint_Coupler implements Horde_Constraint
-{
- protected $_constraints = array();
-
- public function __construct()
- {
- $constraints = func_get_args();
- foreach ($constraints as $c) {
- if (! $c instanceof Horde_Constraint) {
- throw new IllegalArgumentException("$c does not implement Horde_Constraint");
- }
- $this->addConstraint($c);
- }
- }
-
- public function addConstraint(Horde_Constraint $constraint)
- {
- $kind = get_class($this);
- if ($constraint instanceof $kind) {
- foreach ($constraint->getConstraints() as $c) {
- $this->addConstraint($c);
- }
- } else {
- $this->_constraints[] = $constraint;
- }
- return $this;
- }
-
- public function getConstraints()
- {
- return $this->_constraints;
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsEqual.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsEqual.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsEqual.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsEqual.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-
- */
-class Horde_Constraint_IsEqual implements Horde_Constraint
-{
- private $_value;
-
- public function __construct($value)
- {
- $this->_value = $value;
- }
-
- public function evaluate($value)
- {
- return $this->_value == $value;
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsInstanceOf.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsInstanceOf.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsInstanceOf.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsInstanceOf.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-
- */
-class Horde_Constraint_IsInstanceOf implements Horde_Constraint
-{
- private $_type;
-
- public function __construct($type)
- {
- $this->_type = $type;
- }
-
- public function evaluate($value)
- {
- return $value instanceof $this->_type;
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/Not.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Not.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/Not.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Not.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-
- */
-class Horde_Constraint_Not implements Horde_Constraint
-{
- private $_constraint;
-
- public function __construct(Horde_Constraint $constraint)
- {
- $this->_constraint = $constraint;
- }
-
- public function evaluate($value)
- {
- return !$this->_constraint->evaluate($value);
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/Null.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Null.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/Null.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Null.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-
- */
-class Horde_Constraint_Null implements Horde_Constraint
-{
- public function evaluate($value)
- {
- return is_null($value);
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/Or.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Or.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/Or.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Or.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-
- * @author Chuck Hagenbuch
- */
-class Horde_Constraint_Or extends Horde_Constraint_Coupler
-{
- public function evaluate($value)
- {
- foreach ($this->_constraints as $c) {
- if ($c->evaluate($value)) {
- return true;
- }
- }
- return false;
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint/PregMatch.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint/PregMatch.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint/PregMatch.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/PregMatch.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-
- */
-class Horde_Constraint_PregMatch implements Horde_Constraint
-{
- private $_regex;
-
- public function __construct($regex)
- {
- $this->_regex = $regex;
- }
-
- public function evaluate($value)
- {
- return preg_match($this->_regex, $value) > 0;
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/lib/Horde/Constraint.php new/Horde_Constraint-2.0.1/lib/Horde/Constraint.php
--- old/Horde_Constraint-2.0.1/lib/Horde/Constraint.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-
- */
-interface Horde_Constraint
-{
- public function evaluate($value);
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/AllTests.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/AllTests.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/AllTests.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/AllTests.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-run();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysFalseTest.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysFalseTest.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysFalseTest.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysFalseTest.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-assertFalse($const->evaluate($value));
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysTrueTest.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysTrueTest.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysTrueTest.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysTrueTest.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-assertTrue($const->evaluate($value));
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/AndTest.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/AndTest.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/AndTest.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/AndTest.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,63 +0,0 @@
-assertFalse($and->evaluate('test_string'));
- }
-
- public function testAndEvaluatesFalseWhenBothConstraintsAreFalse()
- {
- $c1 = new Horde_Constraint_AlwaysFalse();
- $c2 = new Horde_Constraint_AlwaysFalse();
- $and = new Horde_Constraint_And($c1, $c2);
-
- $this->assertFalse($and->evaluate('test_string'));
- }
-
- public function testAndEvaluatesTrueWhenBothConstraintsAreTrue()
- {
- $c1 = new Horde_Constraint_AlwaysTrue();
- $c2 = new Horde_Constraint_AlwaysTrue();
- $and = new Horde_Constraint_And($c1, $c2);
-
- $this->assertTrue($and->evaluate('test_string'));
- }
-
- public function testAndEvaluatesFalseWhenFalseConstraintIsAddedViaSetter()
- {
- $c1 = new Horde_Constraint_AlwaysTrue();
- $c2 = new Horde_Constraint_AlwaysTrue();
- $and = new Horde_Constraint_And($c1, $c2);
-
- $and->addConstraint(new Horde_Constraint_AlwaysFalse());
-
- $this->assertFalse($and->evaluate('test_string'));
- }
-
- public function testAndaddConstraintReturnsAndConstraint()
- {
- $c1 = new Horde_Constraint_AlwaysTrue();
- $c2 = new Horde_Constraint_AlwaysTrue();
- $and = new Horde_Constraint_And($c1, $c2);
-
- $returnConst = $and->addConstraint(new Horde_Constraint_AlwaysFalse());
-
- $this->assertInstanceOf('Horde_Constraint_And', $returnConst);
- }
-
- public function testReturnedAndEvaluatesFalseWhenFalseConstraintIsAddedViaSetter()
- {
- $c1 = new Horde_Constraint_AlwaysTrue();
- $c2 = new Horde_Constraint_AlwaysTrue();
- $and = new Horde_Constraint_And($c1, $c2);
-
- $and = $and->addConstraint(new Horde_Constraint_AlwaysFalse());
-
- $this->assertFalse($and->evaluate('test_string'));
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/IsInstanceOfTest.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/IsInstanceOfTest.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/IsInstanceOfTest.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/IsInstanceOfTest.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-assertFalse($const->evaluate($foo));
- }
-
- public function testConstraintReturnsTrueWhenInstanceIsCorrectClass()
- {
- $foo = new StdClass();
- $const = new Horde_Constraint_IsInstanceOf('StdClass');
-
- $this->assertTrue($const->evaluate($foo));
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/NotTest.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/NotTest.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/NotTest.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/NotTest.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-assertTrue($not->evaluate('foo'));
- }
-
- public function testNotMakesTrueConstraintFalse()
- {
- $not = new Horde_Constraint_Not(new Horde_Constraint_AlwaysTrue());
- $this->assertFalse($not->evaluate('foo'));
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/NullTest.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/NullTest.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/NullTest.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/NullTest.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-assertTrue($const->evaluate(null));
- }
-
- public function testNullReturnsFalseWhenValue_IsNot_Null()
- {
- $const = new Horde_Constraint_Null();
- $this->assertFalse($const->evaluate('not null value'));
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/OrTest.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/OrTest.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/OrTest.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/OrTest.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,63 +0,0 @@
-assertTrue($or->evaluate('test_string'));
- }
-
- public function testOrEvaluatesFalseWhenBothConstraintsAreFalse()
- {
- $c1 = new Horde_Constraint_AlwaysFalse();
- $c2 = new Horde_Constraint_AlwaysFalse();
- $or = new Horde_Constraint_Or($c1, $c2);
-
- $this->assertFalse($or->evaluate('test_string'));
- }
-
- public function testOrEvaluatesTrueWhenBothConstraintsAreTrue()
- {
- $c1 = new Horde_Constraint_AlwaysTrue();
- $c2 = new Horde_Constraint_AlwaysTrue();
- $or = new Horde_Constraint_Or($c1, $c2);
-
- $this->assertTrue($or->evaluate('test_string'));
- }
-
- public function testOrEvaluatesTrueWhenTrueConstraintIsAddedViaSetter()
- {
- $c1 = new Horde_Constraint_AlwaysFalse();
- $c2 = new Horde_Constraint_AlwaysFalse();
- $or = new Horde_Constraint_Or($c1, $c2);
-
- $or->addConstraint(new Horde_Constraint_AlwaysTrue());
-
- $this->assertTrue($or->evaluate('test_string'));
- }
-
- public function testOraddConstraintReturnsOrConstraint()
- {
- $c1 = new Horde_Constraint_AlwaysTrue();
- $c2 = new Horde_Constraint_AlwaysTrue();
- $or = new Horde_Constraint_Or($c1, $c2);
-
- $returnConst = $or->addConstraint(new Horde_Constraint_AlwaysFalse());
-
- $this->assertInstanceOf('Horde_Constraint_Or', $returnConst);
- }
-
- public function testReturnedOrEvaluatesTrueWhenTrueConstraintIsAddedViaSetter()
- {
- $c1 = new Horde_Constraint_AlwaysFalse();
- $c2 = new Horde_Constraint_AlwaysFalse();
- $or = new Horde_Constraint_Or($c1, $c2);
-
- $or = $or->addConstraint(new Horde_Constraint_AlwaysTrue());
-
- $this->assertTrue($or->evaluate('test_string'));
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/PregMatchTest.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/PregMatchTest.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/PregMatchTest.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/PregMatchTest.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-assertTrue($preg->evaluate('somestring'));
- }
-
- public function testPregReturnsFalseWhenRegex_DoesNot_Match()
- {
- $preg = new Horde_Constraint_PregMatch('/somestring/');
- $this->assertFalse($preg->evaluate('some other string'));
- }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.1/test/Horde/Constraint/bootstrap.php new/Horde_Constraint-2.0.1/test/Horde/Constraint/bootstrap.php
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/bootstrap.php 2012-11-19 14:17:42.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/bootstrap.php 1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-
+ */
+class Horde_Constraint_AlwaysFalse implements Horde_Constraint
+{
+ public function evaluate($value)
+ {
+ return false;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint/AlwaysTrue.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint/AlwaysTrue.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint/AlwaysTrue.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint/AlwaysTrue.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,13 @@
+
+ */
+class Horde_Constraint_AlwaysTrue implements Horde_Constraint
+{
+ public function evaluate($value)
+ {
+ return true;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint/And.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint/And.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint/And.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint/And.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,21 @@
+
+ */
+class Horde_Constraint_And extends Horde_Constraint_Coupler
+{
+ public function evaluate($value)
+ {
+ foreach ($this->_constraints as $c) {
+ if (!$c->evaluate($value)) {
+ return false;
+ }
+ }
+ return true;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint/Coupler.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint/Coupler.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint/Coupler.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint/Coupler.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,39 @@
+
+ */
+abstract class Horde_Constraint_Coupler implements Horde_Constraint
+{
+ protected $_constraints = array();
+
+ public function __construct()
+ {
+ $constraints = func_get_args();
+ foreach ($constraints as $c) {
+ if (! $c instanceof Horde_Constraint) {
+ throw new IllegalArgumentException("$c does not implement Horde_Constraint");
+ }
+ $this->addConstraint($c);
+ }
+ }
+
+ public function addConstraint(Horde_Constraint $constraint)
+ {
+ $kind = get_class($this);
+ if ($constraint instanceof $kind) {
+ foreach ($constraint->getConstraints() as $c) {
+ $this->addConstraint($c);
+ }
+ } else {
+ $this->_constraints[] = $constraint;
+ }
+ return $this;
+ }
+
+ public function getConstraints()
+ {
+ return $this->_constraints;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint/IsEqual.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint/IsEqual.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint/IsEqual.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint/IsEqual.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,22 @@
+
+ */
+class Horde_Constraint_IsEqual implements Horde_Constraint
+{
+ private $_value;
+
+ public function __construct($value)
+ {
+ $this->_value = $value;
+ }
+
+ public function evaluate($value)
+ {
+ return $this->_value == $value;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint/IsInstanceOf.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint/IsInstanceOf.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint/IsInstanceOf.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint/IsInstanceOf.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,22 @@
+
+ */
+class Horde_Constraint_IsInstanceOf implements Horde_Constraint
+{
+ private $_type;
+
+ public function __construct($type)
+ {
+ $this->_type = $type;
+ }
+
+ public function evaluate($value)
+ {
+ return $value instanceof $this->_type;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint/Not.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint/Not.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint/Not.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint/Not.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,22 @@
+
+ */
+class Horde_Constraint_Not implements Horde_Constraint
+{
+ private $_constraint;
+
+ public function __construct(Horde_Constraint $constraint)
+ {
+ $this->_constraint = $constraint;
+ }
+
+ public function evaluate($value)
+ {
+ return !$this->_constraint->evaluate($value);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint/Null.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint/Null.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint/Null.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint/Null.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,15 @@
+
+ */
+class Horde_Constraint_Null implements Horde_Constraint
+{
+ public function evaluate($value)
+ {
+ return is_null($value);
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint/Or.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint/Or.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint/Or.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint/Or.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,19 @@
+
+ * @author Chuck Hagenbuch
+ */
+class Horde_Constraint_Or extends Horde_Constraint_Coupler
+{
+ public function evaluate($value)
+ {
+ foreach ($this->_constraints as $c) {
+ if ($c->evaluate($value)) {
+ return true;
+ }
+ }
+ return false;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint/PregMatch.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint/PregMatch.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint/PregMatch.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint/PregMatch.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,22 @@
+
+ */
+class Horde_Constraint_PregMatch implements Horde_Constraint
+{
+ private $_regex;
+
+ public function __construct($regex)
+ {
+ $this->_regex = $regex;
+ }
+
+ public function evaluate($value)
+ {
+ return preg_match($this->_regex, $value) > 0;
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/lib/Horde/Constraint.php new/Horde_Constraint-2.0.2/lib/Horde/Constraint.php
--- old/Horde_Constraint-2.0.2/lib/Horde/Constraint.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/lib/Horde/Constraint.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,10 @@
+
+ */
+interface Horde_Constraint
+{
+ public function evaluate($value);
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/AllTests.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/AllTests.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/AllTests.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/AllTests.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,3 @@
+run();
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/AlwaysFalseTest.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/AlwaysFalseTest.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/AlwaysFalseTest.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/AlwaysFalseTest.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,22 @@
+assertFalse($const->evaluate($value));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/AlwaysTrueTest.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/AlwaysTrueTest.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/AlwaysTrueTest.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/AlwaysTrueTest.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,22 @@
+assertTrue($const->evaluate($value));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/AndTest.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/AndTest.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/AndTest.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/AndTest.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,63 @@
+assertFalse($and->evaluate('test_string'));
+ }
+
+ public function testAndEvaluatesFalseWhenBothConstraintsAreFalse()
+ {
+ $c1 = new Horde_Constraint_AlwaysFalse();
+ $c2 = new Horde_Constraint_AlwaysFalse();
+ $and = new Horde_Constraint_And($c1, $c2);
+
+ $this->assertFalse($and->evaluate('test_string'));
+ }
+
+ public function testAndEvaluatesTrueWhenBothConstraintsAreTrue()
+ {
+ $c1 = new Horde_Constraint_AlwaysTrue();
+ $c2 = new Horde_Constraint_AlwaysTrue();
+ $and = new Horde_Constraint_And($c1, $c2);
+
+ $this->assertTrue($and->evaluate('test_string'));
+ }
+
+ public function testAndEvaluatesFalseWhenFalseConstraintIsAddedViaSetter()
+ {
+ $c1 = new Horde_Constraint_AlwaysTrue();
+ $c2 = new Horde_Constraint_AlwaysTrue();
+ $and = new Horde_Constraint_And($c1, $c2);
+
+ $and->addConstraint(new Horde_Constraint_AlwaysFalse());
+
+ $this->assertFalse($and->evaluate('test_string'));
+ }
+
+ public function testAndaddConstraintReturnsAndConstraint()
+ {
+ $c1 = new Horde_Constraint_AlwaysTrue();
+ $c2 = new Horde_Constraint_AlwaysTrue();
+ $and = new Horde_Constraint_And($c1, $c2);
+
+ $returnConst = $and->addConstraint(new Horde_Constraint_AlwaysFalse());
+
+ $this->assertInstanceOf('Horde_Constraint_And', $returnConst);
+ }
+
+ public function testReturnedAndEvaluatesFalseWhenFalseConstraintIsAddedViaSetter()
+ {
+ $c1 = new Horde_Constraint_AlwaysTrue();
+ $c2 = new Horde_Constraint_AlwaysTrue();
+ $and = new Horde_Constraint_And($c1, $c2);
+
+ $and = $and->addConstraint(new Horde_Constraint_AlwaysFalse());
+
+ $this->assertFalse($and->evaluate('test_string'));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/IsInstanceOfTest.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/IsInstanceOfTest.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/IsInstanceOfTest.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/IsInstanceOfTest.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,19 @@
+assertFalse($const->evaluate($foo));
+ }
+
+ public function testConstraintReturnsTrueWhenInstanceIsCorrectClass()
+ {
+ $foo = new StdClass();
+ $const = new Horde_Constraint_IsInstanceOf('StdClass');
+
+ $this->assertTrue($const->evaluate($foo));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/NotTest.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/NotTest.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/NotTest.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/NotTest.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,15 @@
+assertTrue($not->evaluate('foo'));
+ }
+
+ public function testNotMakesTrueConstraintFalse()
+ {
+ $not = new Horde_Constraint_Not(new Horde_Constraint_AlwaysTrue());
+ $this->assertFalse($not->evaluate('foo'));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/NullTest.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/NullTest.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/NullTest.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/NullTest.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,15 @@
+assertTrue($const->evaluate(null));
+ }
+
+ public function testNullReturnsFalseWhenValue_IsNot_Null()
+ {
+ $const = new Horde_Constraint_Null();
+ $this->assertFalse($const->evaluate('not null value'));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/OrTest.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/OrTest.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/OrTest.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/OrTest.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,63 @@
+assertTrue($or->evaluate('test_string'));
+ }
+
+ public function testOrEvaluatesFalseWhenBothConstraintsAreFalse()
+ {
+ $c1 = new Horde_Constraint_AlwaysFalse();
+ $c2 = new Horde_Constraint_AlwaysFalse();
+ $or = new Horde_Constraint_Or($c1, $c2);
+
+ $this->assertFalse($or->evaluate('test_string'));
+ }
+
+ public function testOrEvaluatesTrueWhenBothConstraintsAreTrue()
+ {
+ $c1 = new Horde_Constraint_AlwaysTrue();
+ $c2 = new Horde_Constraint_AlwaysTrue();
+ $or = new Horde_Constraint_Or($c1, $c2);
+
+ $this->assertTrue($or->evaluate('test_string'));
+ }
+
+ public function testOrEvaluatesTrueWhenTrueConstraintIsAddedViaSetter()
+ {
+ $c1 = new Horde_Constraint_AlwaysFalse();
+ $c2 = new Horde_Constraint_AlwaysFalse();
+ $or = new Horde_Constraint_Or($c1, $c2);
+
+ $or->addConstraint(new Horde_Constraint_AlwaysTrue());
+
+ $this->assertTrue($or->evaluate('test_string'));
+ }
+
+ public function testOraddConstraintReturnsOrConstraint()
+ {
+ $c1 = new Horde_Constraint_AlwaysTrue();
+ $c2 = new Horde_Constraint_AlwaysTrue();
+ $or = new Horde_Constraint_Or($c1, $c2);
+
+ $returnConst = $or->addConstraint(new Horde_Constraint_AlwaysFalse());
+
+ $this->assertInstanceOf('Horde_Constraint_Or', $returnConst);
+ }
+
+ public function testReturnedOrEvaluatesTrueWhenTrueConstraintIsAddedViaSetter()
+ {
+ $c1 = new Horde_Constraint_AlwaysFalse();
+ $c2 = new Horde_Constraint_AlwaysFalse();
+ $or = new Horde_Constraint_Or($c1, $c2);
+
+ $or = $or->addConstraint(new Horde_Constraint_AlwaysTrue());
+
+ $this->assertTrue($or->evaluate('test_string'));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/PregMatchTest.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/PregMatchTest.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/PregMatchTest.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/PregMatchTest.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,15 @@
+assertTrue($preg->evaluate('somestring'));
+ }
+
+ public function testPregReturnsFalseWhenRegex_DoesNot_Match()
+ {
+ $preg = new Horde_Constraint_PregMatch('/somestring/');
+ $this->assertFalse($preg->evaluate('some other string'));
+ }
+}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Horde_Constraint-2.0.2/test/Horde/Constraint/bootstrap.php new/Horde_Constraint-2.0.2/test/Horde/Constraint/bootstrap.php
--- old/Horde_Constraint-2.0.2/test/Horde/Constraint/bootstrap.php 1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.2/test/Horde/Constraint/bootstrap.php 2015-01-08 12:34:48.000000000 +0100
@@ -0,0 +1,3 @@
+