Hello community,

here is the log from the commit of package php5-pear-Horde_Constraint for 
openSUSE:Factory checked in at 2012-11-28 13:41:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
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", Maintainer is ""

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/php5-pear-Horde_Constraint/php5-pear-Horde_Constraint.changes
    2012-02-16 12:26:24.000000000 +0100
+++ 
/work/SRC/openSUSE:Factory/.php5-pear-Horde_Constraint.new/php5-pear-Horde_Constraint.changes
       2012-11-28 13:41:59.000000000 +0100
@@ -1,0 +2,7 @@
+Tue Nov 20 15:31:40 UTC 2012 -  <sag...@b1-systems.de>
+
+- Version 2.0.1
+- [jan] Fix tests to work with PHPUnit 3.6.
+
+
+-------------------------------------------------------------------

Old:
----
  Horde_Constraint-1.0.1.tgz

New:
----
  Horde_Constraint-2.0.1.tgz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ php5-pear-Horde_Constraint.spec ++++++
--- /var/tmp/diff_new_pack.g93lMt/_old  2012-11-28 13:42:00.000000000 +0100
+++ /var/tmp/diff_new_pack.g93lMt/_new  2012-11-28 13:42:00.000000000 +0100
@@ -16,29 +16,38 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-Summary:        PEAR: Horde Constraint library
+
+Summary:        Horde Constraint library
 License:        BSD-2-Clause
 Group:          Development/Libraries/PHP
 Name:           php5-pear-Horde_Constraint
 %define pear_name  Horde_Constraint
 %define pear_sname horde_constraint
-Version:        1.0.1
+Version:        2.0.1
 Release:        0
 Source0:        http://pear.horde.org/get/Horde_Constraint-%{version}.tgz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Url:            http://pear.horde.org/package/Horde_Constraint
-BuildRequires:  php5-pear >= 1.4.7
+Requires:       php >= 5.3.3
+BuildRequires:  php >= 5.3.3
+BuildRequires:  php-pear >= 1.7.0
 BuildRequires:  php5-pear-channel-horde
 Requires:       php5-pear-channel-horde
 BuildArch:      noarch
+
+%if 0%{?sles_version} == 11
+BuildRequires:  php53-devel
+%else
 BuildRequires:  php-macros
+%endif
+
 # Fix for renaming (package convention)
-Provides:       php5-pear-%{pear_sname} = %{version}
-Provides:       php-pear-%{pear_sname} = %{version}
 Provides:       pear-%{pear_sname} = %{version}
-Obsoletes:      php5-pear-%{pear_sname} < %{version}
-Obsoletes:      php-pear-%{pear_sname} < %{version}
+Provides:       php-pear-%{pear_sname} = %{version}
+Provides:       php5-pear-%{pear_sname} = %{version}
 Obsoletes:      pear-%{pear_sname} < %{version}
+Obsoletes:      php-pear-%{pear_sname} < %{version}
+Obsoletes:      php5-pear-%{pear_sname} < %{version}
 
 %description
 This package provides a programmatic way of building constraints that

++++++ Horde_Constraint-1.0.1.tgz -> Horde_Constraint-2.0.1.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Horde_Constraint-1.0.1/doc/Horde/Constraint/COPYING 
new/Horde_Constraint-1.0.1/doc/Horde/Constraint/COPYING
--- old/Horde_Constraint-1.0.1/doc/Horde/Constraint/COPYING     2011-11-22 
14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/doc/Horde/Constraint/COPYING     1970-01-01 
01:00:00.000000000 +0100
@@ -1,24 +0,0 @@
-        Copyright 1999-2011 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-1.0.1/lib/Horde/Constraint/AlwaysFalse.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/AlwaysFalse.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/AlwaysFalse.php     
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/AlwaysFalse.php     
1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-<?php
-/**
- * Always returns false
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-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-1.0.1/lib/Horde/Constraint/AlwaysTrue.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/AlwaysTrue.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/AlwaysTrue.php      
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/AlwaysTrue.php      
1970-01-01 01:00:00.000000000 +0100
@@ -1,13 +0,0 @@
-<?php
-/**
- * Always returns true
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-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-1.0.1/lib/Horde/Constraint/And.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/And.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/And.php     2011-11-22 
14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/And.php     1970-01-01 
01:00:00.000000000 +0100
@@ -1,21 +0,0 @@
-<?php
-/**
- * Represents a collection of constraints, if one is false, this collection 
will
- * evaluate to false
- *
- * Based on PHPUnit_Framework_Constraint_And
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-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-1.0.1/lib/Horde/Constraint/Coupler.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/Coupler.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/Coupler.php 2011-11-22 
14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/Coupler.php 1970-01-01 
01:00:00.000000000 +0100
@@ -1,39 +0,0 @@
-<?php
-/**
- * Interface for grouped (compound, coupled) constraints.
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-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-1.0.1/lib/Horde/Constraint/IsEqual.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/IsEqual.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/IsEqual.php 2011-11-22 
14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/IsEqual.php 1970-01-01 
01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-<?php
-/**
- * Checks for equality
- *
- * Based on PHPUnit_Framework_Constraint_IsEqual
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-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-1.0.1/lib/Horde/Constraint/IsInstanceOf.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/IsInstanceOf.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/IsInstanceOf.php    
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/IsInstanceOf.php    
1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-<?php
-/**
- * Checks for an instance of a class
- *
- * Based on PHPUnit_Framework_Constraint_IsInstanceOf
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-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-1.0.1/lib/Horde/Constraint/Not.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/Not.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/Not.php     2011-11-22 
14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/Not.php     1970-01-01 
01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-<?php
-/**
- * Negates another constraint
- *
- * Based on PHPUnit_Framework_Constraint_Not
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-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-1.0.1/lib/Horde/Constraint/Null.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/Null.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/Null.php    2011-11-22 
14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/Null.php    1970-01-01 
01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-<?php
-/**
- * Checks if the value is null
- *
- * Based on PHPUnit_Framework_Constraint_Null
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-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-1.0.1/lib/Horde/Constraint/Or.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/Or.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/Or.php      2011-11-22 
14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/Or.php      1970-01-01 
01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-<?php
-/**
- * Represents a collection of constraints, if any are true, the collection 
will evaluate to true.
- *
- * @author James Pepin <ja...@jamespepin.com>
- * @author Chuck Hagenbuch <ch...@horde.org>
- */
-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-1.0.1/lib/Horde/Constraint/PregMatch.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint/PregMatch.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint/PregMatch.php       
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint/PregMatch.php       
1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-<?php
-/**
- * Matches against a PCRE regex
- *
- * Based on PHPUnit_Framework_Constraint_PCREMatch
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-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-1.0.1/lib/Horde/Constraint.php 
new/Horde_Constraint-1.0.1/lib/Horde/Constraint.php
--- old/Horde_Constraint-1.0.1/lib/Horde/Constraint.php 2011-11-22 
14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/lib/Horde/Constraint.php 1970-01-01 
01:00:00.000000000 +0100
@@ -1,10 +0,0 @@
-<?php
-/**
- * Interface for constraints.
- *
- * @author James Pepin <ja...@jamespepin.com>
- */
-interface Horde_Constraint
-{
-    public function evaluate($value);
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Horde_Constraint-1.0.1/test/Horde/Constraint/AllTests.php 
new/Horde_Constraint-1.0.1/test/Horde/Constraint/AllTests.php
--- old/Horde_Constraint-1.0.1/test/Horde/Constraint/AllTests.php       
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/test/Horde/Constraint/AllTests.php       
1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-<?php
-/**
- * @package    Constraint
- * @subpackage UnitTests
- */
-
-/**
- * Define the main method
- */
-if (!defined('PHPUnit_MAIN_METHOD')) {
-    define('PHPUnit_MAIN_METHOD', 'Horde_Constraint_AllTests::main');
-}
-
-/**
- * Prepare the test setup.
- */
-require_once 'Horde/Test/AllTests.php';
-set_include_path(dirname(__FILE__) . '/../../' . PATH_SEPARATOR . 
get_include_path());
-
-/**
- * @package    Constraint
- * @subpackage UnitTests
- */
-class Horde_Constraint_AllTests extends Horde_Test_AllTests
-{
-}
-
-Horde_Constraint_AllTests::init('Horde_Constraint', __FILE__);
-
-if (PHPUnit_MAIN_METHOD == 'Horde_Constraint_AllTests::main') {
-    Horde_Constraint_AllTests::main();
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Horde_Constraint-1.0.1/test/Horde/Constraint/AlwaysFalseTest.php 
new/Horde_Constraint-1.0.1/test/Horde/Constraint/AlwaysFalseTest.php
--- old/Horde_Constraint-1.0.1/test/Horde/Constraint/AlwaysFalseTest.php        
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/test/Horde/Constraint/AlwaysFalseTest.php        
1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-<?php
-class Horde_Constraint_AlwaysFalseTest extends Horde_Test_Case
-{
-    public static function randomObjectProvider()
-    {
-        return array(
-            array('teststring'),
-            array(''),
-            array(true),
-            array(false),
-        );
-    }
-
-    /**
-     * @dataProvider randomObjectProvider
-     */
-    public function testEvaluateIsAlwaysFalse($value)
-    {
-        $const = new Horde_Constraint_AlwaysFalse();
-        $this->assertFalse($const->evaluate($value));
-    }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Horde_Constraint-1.0.1/test/Horde/Constraint/AlwaysTrueTest.php 
new/Horde_Constraint-1.0.1/test/Horde/Constraint/AlwaysTrueTest.php
--- old/Horde_Constraint-1.0.1/test/Horde/Constraint/AlwaysTrueTest.php 
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/test/Horde/Constraint/AlwaysTrueTest.php 
1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-<?php
-class Horde_Constraint_AlwaysTrueTest extends Horde_Test_Case
-{
-    public static function randomObjectProvider()
-    {
-        return array(
-            array('teststring'),
-            array(''),
-            array(true),
-            array(false),
-        );
-    }
-
-    /**
-     * @dataProvider randomObjectProvider
-     */
-    public function testEvaluateIsAlwaysTrue($value)
-    {
-        $const = new Horde_Constraint_AlwaysTrue();
-        $this->assertTrue($const->evaluate($value));
-    }
-}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Horde_Constraint-1.0.1/test/Horde/Constraint/AndTest.php 
new/Horde_Constraint-1.0.1/test/Horde/Constraint/AndTest.php
--- old/Horde_Constraint-1.0.1/test/Horde/Constraint/AndTest.php        
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/test/Horde/Constraint/AndTest.php        
1970-01-01 01:00:00.000000000 +0100
@@ -1,63 +0,0 @@
-<?php
-class Horde_Constraint_AndTest extends Horde_Test_Case
-{
-    public function testAndEvaluatesFalseWhenOneConstraintIsFalse()
-    {
-        $c1  = new Horde_Constraint_AlwaysTrue();
-        $c2  = new Horde_Constraint_AlwaysFalse();
-        $and = new Horde_Constraint_And($c1, $c2);
-
-        $this->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-1.0.1/test/Horde/Constraint/IsInstanceOfTest.php 
new/Horde_Constraint-1.0.1/test/Horde/Constraint/IsInstanceOfTest.php
--- old/Horde_Constraint-1.0.1/test/Horde/Constraint/IsInstanceOfTest.php       
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/test/Horde/Constraint/IsInstanceOfTest.php       
1970-01-01 01:00:00.000000000 +0100
@@ -1,19 +0,0 @@
-<?php
-class Horde_Constraint_IsInstanceOfTest extends Horde_Test_Case
-{
-    public function testConstraintReturnsFalseWhenInstanceIsWrongClass()
-    {
-        $foo = new StdClass();
-        $const = new Horde_Constraint_IsInstanceOf('FakeClassName');
-
-        $this->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-1.0.1/test/Horde/Constraint/NotTest.php 
new/Horde_Constraint-1.0.1/test/Horde/Constraint/NotTest.php
--- old/Horde_Constraint-1.0.1/test/Horde/Constraint/NotTest.php        
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/test/Horde/Constraint/NotTest.php        
1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-<?php
-class Horde_Constraint_NotTest extends Horde_Test_Case
-{
-    public function testNotMakesFalseConstraintTrue()
-    {
-        $not = new Horde_Constraint_Not(new Horde_Constraint_AlwaysFalse());
-        $this->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-1.0.1/test/Horde/Constraint/NullTest.php 
new/Horde_Constraint-1.0.1/test/Horde/Constraint/NullTest.php
--- old/Horde_Constraint-1.0.1/test/Horde/Constraint/NullTest.php       
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/test/Horde/Constraint/NullTest.php       
1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-<?php
-class Horde_Constraint_NullTest extends Horde_Test_Case
-{
-    public function testNullReturnsTrueWhenValueisNull()
-    {
-        $const = new Horde_Constraint_Null();
-        $this->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-1.0.1/test/Horde/Constraint/OrTest.php 
new/Horde_Constraint-1.0.1/test/Horde/Constraint/OrTest.php
--- old/Horde_Constraint-1.0.1/test/Horde/Constraint/OrTest.php 2011-11-22 
14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/test/Horde/Constraint/OrTest.php 1970-01-01 
01:00:00.000000000 +0100
@@ -1,63 +0,0 @@
-<?php
-class Horde_Constraint_OrTest extends Horde_Test_Case
-{
-    public function testOrEvaluatesTrueWhenOneConstraintIsTrue()
-    {
-        $c1 = new Horde_Constraint_AlwaysTrue();
-        $c2 = new Horde_Constraint_AlwaysFalse();
-        $or = new Horde_Constraint_Or($c1, $c2);
-
-        $this->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-1.0.1/test/Horde/Constraint/PregMatchTest.php 
new/Horde_Constraint-1.0.1/test/Horde/Constraint/PregMatchTest.php
--- old/Horde_Constraint-1.0.1/test/Horde/Constraint/PregMatchTest.php  
2011-11-22 14:52:46.000000000 +0100
+++ new/Horde_Constraint-1.0.1/test/Horde/Constraint/PregMatchTest.php  
1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-<?php
-class Horde_Constraint_PregMatchTest extends Horde_Test_Case
-{
-    public function testPregReturnsTrueWhenRegexMatches()
-    {
-        $preg = new Horde_Constraint_PregMatch('/somestring/');
-        $this->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/doc/Horde/Constraint/COPYING 
new/Horde_Constraint-2.0.1/doc/Horde/Constraint/COPYING
--- old/Horde_Constraint-2.0.1/doc/Horde/Constraint/COPYING     1970-01-01 
01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/doc/Horde/Constraint/COPYING     2012-11-19 
14:17:42.000000000 +0100
@@ -0,0 +1,24 @@
+        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     
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysFalse.php     
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Always returns false
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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      
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/AlwaysTrue.php      
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,13 @@
+<?php
+/**
+ * Always returns true
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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     1970-01-01 
01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/And.php     2012-11-19 
14:17:42.000000000 +0100
@@ -0,0 +1,21 @@
+<?php
+/**
+ * Represents a collection of constraints, if one is false, this collection 
will
+ * evaluate to false
+ *
+ * Based on PHPUnit_Framework_Constraint_And
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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 1970-01-01 
01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Coupler.php 2012-11-19 
14:17:42.000000000 +0100
@@ -0,0 +1,39 @@
+<?php
+/**
+ * Interface for grouped (compound, coupled) constraints.
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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 1970-01-01 
01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsEqual.php 2012-11-19 
14:17:42.000000000 +0100
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Checks for equality
+ *
+ * Based on PHPUnit_Framework_Constraint_IsEqual
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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    
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/IsInstanceOf.php    
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Checks for an instance of a class
+ *
+ * Based on PHPUnit_Framework_Constraint_IsInstanceOf
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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     1970-01-01 
01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Not.php     2012-11-19 
14:17:42.000000000 +0100
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Negates another constraint
+ *
+ * Based on PHPUnit_Framework_Constraint_Not
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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    1970-01-01 
01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Null.php    2012-11-19 
14:17:42.000000000 +0100
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Checks if the value is null
+ *
+ * Based on PHPUnit_Framework_Constraint_Null
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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      1970-01-01 
01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/Or.php      2012-11-19 
14:17:42.000000000 +0100
@@ -0,0 +1,19 @@
+<?php
+/**
+ * Represents a collection of constraints, if any are true, the collection 
will evaluate to true.
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ * @author Chuck Hagenbuch <ch...@horde.org>
+ */
+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       
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint/PregMatch.php       
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,22 @@
+<?php
+/**
+ * Matches against a PCRE regex
+ *
+ * Based on PHPUnit_Framework_Constraint_PCREMatch
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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 1970-01-01 
01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/lib/Horde/Constraint.php 2012-11-19 
14:17:42.000000000 +0100
@@ -0,0 +1,10 @@
+<?php
+/**
+ * Interface for constraints.
+ *
+ * @author James Pepin <ja...@jamespepin.com>
+ */
+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       
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/AllTests.php       
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,3 @@
+<?php
+require_once 'Horde/Test/AllTests.php';
+Horde_Test_AllTests::init(__FILE__)->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        
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysFalseTest.php        
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,22 @@
+<?php
+class Horde_Constraint_AlwaysFalseTest extends Horde_Test_Case
+{
+    public static function randomObjectProvider()
+    {
+        return array(
+            array('teststring'),
+            array(''),
+            array(true),
+            array(false),
+        );
+    }
+
+    /**
+     * @dataProvider randomObjectProvider
+     */
+    public function testEvaluateIsAlwaysFalse($value)
+    {
+        $const = new Horde_Constraint_AlwaysFalse();
+        $this->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 
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/AlwaysTrueTest.php 
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,22 @@
+<?php
+class Horde_Constraint_AlwaysTrueTest extends Horde_Test_Case
+{
+    public static function randomObjectProvider()
+    {
+        return array(
+            array('teststring'),
+            array(''),
+            array(true),
+            array(false),
+        );
+    }
+
+    /**
+     * @dataProvider randomObjectProvider
+     */
+    public function testEvaluateIsAlwaysTrue($value)
+    {
+        $const = new Horde_Constraint_AlwaysTrue();
+        $this->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        
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/AndTest.php        
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,63 @@
+<?php
+class Horde_Constraint_AndTest extends Horde_Test_Case
+{
+    public function testAndEvaluatesFalseWhenOneConstraintIsFalse()
+    {
+        $c1  = new Horde_Constraint_AlwaysTrue();
+        $c2  = new Horde_Constraint_AlwaysFalse();
+        $and = new Horde_Constraint_And($c1, $c2);
+
+        $this->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       
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/IsInstanceOfTest.php       
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,19 @@
+<?php
+class Horde_Constraint_IsInstanceOfTest extends Horde_Test_Case
+{
+    public function testConstraintReturnsFalseWhenInstanceIsWrongClass()
+    {
+        $foo = new StdClass();
+        $const = new Horde_Constraint_IsInstanceOf('FakeClassName');
+
+        $this->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        
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/NotTest.php        
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,15 @@
+<?php
+class Horde_Constraint_NotTest extends Horde_Test_Case
+{
+    public function testNotMakesFalseConstraintTrue()
+    {
+        $not = new Horde_Constraint_Not(new Horde_Constraint_AlwaysFalse());
+        $this->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       
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/NullTest.php       
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,15 @@
+<?php
+class Horde_Constraint_NullTest extends Horde_Test_Case
+{
+    public function testNullReturnsTrueWhenValueisNull()
+    {
+        $const = new Horde_Constraint_Null();
+        $this->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 1970-01-01 
01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/OrTest.php 2012-11-19 
14:17:42.000000000 +0100
@@ -0,0 +1,63 @@
+<?php
+class Horde_Constraint_OrTest extends Horde_Test_Case
+{
+    public function testOrEvaluatesTrueWhenOneConstraintIsTrue()
+    {
+        $c1 = new Horde_Constraint_AlwaysTrue();
+        $c2 = new Horde_Constraint_AlwaysFalse();
+        $or = new Horde_Constraint_Or($c1, $c2);
+
+        $this->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  
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/PregMatchTest.php  
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,15 @@
+<?php
+class Horde_Constraint_PregMatchTest extends Horde_Test_Case
+{
+    public function testPregReturnsTrueWhenRegexMatches()
+    {
+        $preg = new Horde_Constraint_PregMatch('/somestring/');
+        $this->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      
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/bootstrap.php      
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1,3 @@
+<?php
+require_once 'Horde/Test/Bootstrap.php';
+Horde_Test_Bootstrap::bootstrap(dirname(__FILE__));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/Horde_Constraint-2.0.1/test/Horde/Constraint/phpunit.xml 
new/Horde_Constraint-2.0.1/test/Horde/Constraint/phpunit.xml
--- old/Horde_Constraint-2.0.1/test/Horde/Constraint/phpunit.xml        
1970-01-01 01:00:00.000000000 +0100
+++ new/Horde_Constraint-2.0.1/test/Horde/Constraint/phpunit.xml        
2012-11-19 14:17:42.000000000 +0100
@@ -0,0 +1 @@
+<phpunit bootstrap="bootstrap.php"></phpunit>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/package.xml new/package.xml
--- old/package.xml     2011-11-22 14:52:46.000000000 +0100
+++ new/package.xml     2012-11-19 14:17:42.000000000 +0100
@@ -10,23 +10,23 @@
   <email>ch...@horde.org</email>
   <active>yes</active>
  </lead>
- <date>2011-11-22</date>
- <time>14:52:46</time>
+ <date>2012-11-19</date>
+ <time>14:17:42</time>
  <version>
-  <release>1.0.1</release>
+  <release>2.0.1</release>
   <api>1.0.0</api>
  </version>
  <stability>
   <release>stable</release>
   <api>stable</api>
  </stability>
- <license uri="http://www.horde.org/licenses/bsd";>BSD</license>
+ <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
  <notes>
-* [jan] Fix tests to work with PHPUnit 3.6.
+* [mms] Use new Horde_Test layout.
  </notes>
  <contents>
   <dir baseinstalldir="/" name="/">
-   <file baseinstalldir="/" md5sum="3e601e74c18691c7ed18665510ede17e" 
name="doc/Horde/Constraint/COPYING" role="doc" />
+   <file baseinstalldir="/" md5sum="03dc05714e363d71bd24f3fae5ed5903" 
name="doc/Horde/Constraint/COPYING" role="doc" />
    <file baseinstalldir="/" md5sum="32570005a5df92bcfd4bb192552b23df" 
name="lib/Horde/Constraint/AlwaysFalse.php" role="php" />
    <file baseinstalldir="/" md5sum="9147f23fb1154386b7c9d45e169e13d0" 
name="lib/Horde/Constraint/AlwaysTrue.php" role="php" />
    <file baseinstalldir="/" md5sum="539233a8000ebeedfdde15669a067418" 
name="lib/Horde/Constraint/And.php" role="php" />
@@ -38,26 +38,37 @@
    <file baseinstalldir="/" md5sum="39c729755298569b6d007f09b261c3df" 
name="lib/Horde/Constraint/Or.php" role="php" />
    <file baseinstalldir="/" md5sum="5be5d2bc6a3a8bec08cfb05f099a9f81" 
name="lib/Horde/Constraint/PregMatch.php" role="php" />
    <file baseinstalldir="/" md5sum="aa8d4bb3fa2c682df813d9a912563e80" 
name="lib/Horde/Constraint.php" role="php" />
-   <file baseinstalldir="/" md5sum="e12bff1991021a2efd2069a9bba032b3" 
name="test/Horde/Constraint/AllTests.php" role="test" />
+   <file baseinstalldir="/" md5sum="8bc9518b9c0576806c82d9413489d099" 
name="test/Horde/Constraint/AllTests.php" role="test" />
    <file baseinstalldir="/" md5sum="38fc77e759defa43bfa317ef65e1fc72" 
name="test/Horde/Constraint/AlwaysFalseTest.php" role="test" />
    <file baseinstalldir="/" md5sum="d228afe51ddba9c36d0fba62f6ad3174" 
name="test/Horde/Constraint/AlwaysTrueTest.php" role="test" />
    <file baseinstalldir="/" md5sum="55247a26f8aefccc66224cde6df47231" 
name="test/Horde/Constraint/AndTest.php" role="test" />
+   <file baseinstalldir="/" md5sum="0a5018f0726d4673850fece3ad4d72c0" 
name="test/Horde/Constraint/bootstrap.php" role="test" />
    <file baseinstalldir="/" md5sum="1ca0b371274f87b600e81a8f8ac90f67" 
name="test/Horde/Constraint/IsInstanceOfTest.php" role="test" />
    <file baseinstalldir="/" md5sum="9198c0fd0a79ad880fac728a8d84ccac" 
name="test/Horde/Constraint/NotTest.php" role="test" />
    <file baseinstalldir="/" md5sum="b6b1a9d583711b38831c3058535f5063" 
name="test/Horde/Constraint/NullTest.php" role="test" />
    <file baseinstalldir="/" md5sum="db9077300fd45c712f729feda26bf604" 
name="test/Horde/Constraint/OrTest.php" role="test" />
+   <file baseinstalldir="/" md5sum="090ce475b8a9773a240e954334988c75" 
name="test/Horde/Constraint/phpunit.xml" role="test" />
    <file baseinstalldir="/" md5sum="bba1572d784015d21b9a881546dd703a" 
name="test/Horde/Constraint/PregMatchTest.php" role="test" />
   </dir>
  </contents>
  <dependencies>
   <required>
    <php>
-    <min>5.2.0</min>
+    <min>5.3.0</min>
    </php>
    <pearinstaller>
     <min>1.7.0</min>
    </pearinstaller>
   </required>
+  <optional>
+   <package>
+    <name>Horde_Test</name>
+    <channel>pear.horde.org</channel>
+    <min>2.1.0</min>
+    <max>3.0.0alpha1</max>
+    <exclude>3.0.0alpha1</exclude>
+   </package>
+  </optional>
  </dependencies>
  <phprelease>
   <filelist>
@@ -77,10 +88,12 @@
    <install as="Horde/Constraint/AlwaysFalseTest.php" 
name="test/Horde/Constraint/AlwaysFalseTest.php" />
    <install as="Horde/Constraint/AlwaysTrueTest.php" 
name="test/Horde/Constraint/AlwaysTrueTest.php" />
    <install as="Horde/Constraint/AndTest.php" 
name="test/Horde/Constraint/AndTest.php" />
+   <install as="Horde/Constraint/bootstrap.php" 
name="test/Horde/Constraint/bootstrap.php" />
    <install as="Horde/Constraint/IsInstanceOfTest.php" 
name="test/Horde/Constraint/IsInstanceOfTest.php" />
    <install as="Horde/Constraint/NotTest.php" 
name="test/Horde/Constraint/NotTest.php" />
    <install as="Horde/Constraint/NullTest.php" 
name="test/Horde/Constraint/NullTest.php" />
    <install as="Horde/Constraint/OrTest.php" 
name="test/Horde/Constraint/OrTest.php" />
+   <install as="Horde/Constraint/phpunit.xml" 
name="test/Horde/Constraint/phpunit.xml" />
    <install as="Horde/Constraint/PregMatchTest.php" 
name="test/Horde/Constraint/PregMatchTest.php" />
   </filelist>
  </phprelease>
@@ -95,7 +108,7 @@
     <api>alpha</api>
    </stability>
    <date>2011-03-08</date>
-   <license uri="http://www.horde.org/licenses/bsd";>BSD</license>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
    <notes>
 * First alpha release for Horde 4.
    </notes>
@@ -110,7 +123,7 @@
     <api>beta</api>
    </stability>
    <date>2011-03-16</date>
-   <license uri="http://www.horde.org/licenses/bsd";>BSD</license>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
    <notes>
 * First beta release for Horde 4.
    </notes>
@@ -125,7 +138,7 @@
     <api>beta</api>
    </stability>
    <date>2011-03-22</date>
-   <license uri="http://www.horde.org/licenses/bsd";>BSD</license>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
    <notes>
 * First release candidate for Horde 4.
    </notes>
@@ -140,7 +153,7 @@
     <api>beta</api>
    </stability>
    <date>2011-03-29</date>
-   <license uri="http://www.horde.org/licenses/bsd";>BSD</license>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
    <notes>
 * Second release candidate for Horde 4.
    </notes>
@@ -155,7 +168,7 @@
     <api>stable</api>
    </stability>
    <date>2011-04-06</date>
-   <license uri="http://www.horde.org/licenses/bsd";>BSD</license>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
    <notes>
 * First stable release for Horde 4.
    </notes>
@@ -170,10 +183,70 @@
     <api>stable</api>
    </stability>
    <date>2011-11-22</date>
-   <license uri="http://www.horde.org/licenses/bsd";>BSD</license>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
    <notes>
 * [jan] Fix tests to work with PHPUnit 3.6.
    </notes>
   </release>
+  <release>
+   <version>
+    <release>2.0.0alpha1</release>
+    <api>1.0.0</api>
+   </version>
+   <stability>
+    <release>alpha</release>
+    <api>stable</api>
+   </stability>
+   <date>2012-07-05</date>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
+   <notes>
+* First alpha release for Horde 5.
+   </notes>
+  </release>
+  <release>
+   <version>
+    <release>2.0.0beta1</release>
+    <api>1.0.0</api>
+   </version>
+   <stability>
+    <release>beta</release>
+    <api>stable</api>
+   </stability>
+   <date>2012-07-19</date>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
+   <notes>
+* First beta release for Horde 5.
+   </notes>
+  </release>
+  <release>
+   <version>
+    <release>2.0.0</release>
+    <api>1.0.0</api>
+   </version>
+   <stability>
+    <release>stable</release>
+    <api>stable</api>
+   </stability>
+   <date>2012-10-30</date>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
+   <notes>
+* First stable release for Horde 5.
+   </notes>
+  </release>
+  <release>
+   <version>
+    <release>2.0.1</release>
+    <api>1.0.0</api>
+   </version>
+   <stability>
+    <release>stable</release>
+    <api>stable</api>
+   </stability>
+   <date>2012-11-19</date>
+   <license uri="http://www.horde.org/licenses/bsd";>BSD-2-Clause</license>
+   <notes>
+* [mms] Use new Horde_Test layout.
+   </notes>
+  </release>
  </changelog>
 </package>

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to