Skip to content

Commit

Permalink
Post-PEAR cleanup, phase one: PHPUnit2_* -> PHPUnit_*, pear.php.net -…
Browse files Browse the repository at this point in the history
…> phpunit.de, etc.
  • Loading branch information
sebastianbergmann committed Jun 29, 2006
1 parent 8b8c705 commit 6b0d2d5
Show file tree
Hide file tree
Showing 172 changed files with 2,027 additions and 2,015 deletions.
12 changes: 6 additions & 6 deletions Extensions/ExceptionTestCase.php
Expand Up @@ -42,14 +42,14 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version SVN: $Id$
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since File available since Release 2.0.0
*/

require_once 'PHPUnit2/Framework.php';
require_once 'PHPUnit2/Util/Filter.php';
require_once 'PHPUnit/Framework.php';
require_once 'PHPUnit/Util/Filter.php';

PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

/**
* A TestCase that expects a specified Exception to be thrown.
Expand All @@ -60,10 +60,10 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version Release: @package_version@
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since Class available since Release 2.0.0
*/
class PHPUnit2_Extensions_ExceptionTestCase extends PHPUnit2_Framework_TestCase
class PHPUnit_Extensions_ExceptionTestCase extends PHPUnit_Framework_TestCase
{
/**
* The name of the expected Exception.
Expand Down
12 changes: 6 additions & 6 deletions Extensions/MockObject/Builder/Identity.php
Expand Up @@ -43,21 +43,21 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version SVN: $Id$
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since File available since Release 3.0.0
*/

require_once 'PHPUnit2/Util/Filter.php';
require_once 'PHPUnit/Util/Filter.php';

PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

/**
* Builder interface for unique identifiers.
*
* Defines the interface for recording unique identifiers. The identifiers
* can be used to define the invocation order of expectations. The expectation
* is recorded using id() and then defined in order using
* PHPUnit2_Extensions_MockObject_Builder_Match::after().
* PHPUnit_Extensions_MockObject_Builder_Match::after().
*
* @category Testing
* @package PHPUnit2
Expand All @@ -66,10 +66,10 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version Release: @package_version@
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since Interface available since Release 3.0.0
*/
interface PHPUnit2_Extensions_MockObject_Builder_Identity
interface PHPUnit_Extensions_MockObject_Builder_Identity
{
/**
* Sets the identification of the expectation to $id.
Expand Down
30 changes: 15 additions & 15 deletions Extensions/MockObject/Builder/InvocationMocker.php
Expand Up @@ -43,24 +43,24 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version SVN: $Id$
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since File available since Release 3.0.0
*/

require_once 'PHPUnit2/Util/Filter.php';
require_once 'PHPUnit2/Extensions/MockObject/Builder/MethodNameMatch.php';
require_once 'PHPUnit2/Extensions/MockObject/Matcher.php';
require_once 'PHPUnit2/Extensions/MockObject/Stub.php';
require_once 'PHPUnit/Util/Filter.php';
require_once 'PHPUnit/Extensions/MockObject/Builder/MethodNameMatch.php';
require_once 'PHPUnit/Extensions/MockObject/Matcher.php';
require_once 'PHPUnit/Extensions/MockObject/Stub.php';

PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

/**
* Builder for mocked or stubbed invocations.
*
* Provides methods for building expectations without having to resort to
* instantiating the various matchers manually. These methods also form a
* more natural way of reading the expectation. This class should be together
* with the test case PHPUnit2_Extensions_MockObject_TestCase.
* with the test case PHPUnit_Extensions_MockObject_TestCase.
*
* @category Testing
* @package PHPUnit2
Expand All @@ -69,19 +69,19 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version Release: @package_version@
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since Class available since Release 3.0.0
*/
class PHPUnit2_Extensions_MockObject_Builder_InvocationMocker implements PHPUnit2_Extensions_MockObject_Builder_MethodNameMatch
class PHPUnit_Extensions_MockObject_Builder_InvocationMocker implements PHPUnit_Extensions_MockObject_Builder_MethodNameMatch
{
private $collection;

private $matcher;

public function __construct(PHPUnit2_Extensions_MockObject_Stub_MatcherCollection $collection, PHPUnit2_Extensions_MockObject_Matcher_Invocation $invocationMatcher)
public function __construct(PHPUnit_Extensions_MockObject_Stub_MatcherCollection $collection, PHPUnit_Extensions_MockObject_Matcher_Invocation $invocationMatcher)
{
$this->collection = $collection;
$this->matcher = new PHPUnit2_Extensions_MockObject_Matcher($invocationMatcher);
$this->matcher = new PHPUnit_Extensions_MockObject_Matcher($invocationMatcher);

$this->collection->addMatcher($this->matcher);
}
Expand All @@ -98,7 +98,7 @@ public function id($id)
return $this;
}

public function will(PHPUnit2_Extensions_MockObject_Stub $stub)
public function will(PHPUnit_Extensions_MockObject_Stub $stub)
{
$this->matcher->stub = $stub;

Expand All @@ -124,7 +124,7 @@ public function with()
throw new RuntimeException('Parameter matcher is already defined, cannot redefine');
}

$this->matcher->parametersMatcher = new PHPUnit2_Extensions_MockObject_Matcher_Parameters($args);
$this->matcher->parametersMatcher = new PHPUnit_Extensions_MockObject_Matcher_Parameters($args);

return $this;
}
Expand All @@ -139,7 +139,7 @@ public function withAnyParameters()
throw new RuntimeException('Parameter matcher is already defined, cannot redefine');
}

$this->matcher->parametersMatcher = new PHPUnit2_Extensions_MockObject_Matcher_AnyParameters();
$this->matcher->parametersMatcher = new PHPUnit_Extensions_MockObject_Matcher_AnyParameters();

return $this;
}
Expand All @@ -150,7 +150,7 @@ public function method($constraint)
throw new RuntimeException('Method name matcher is already defined, cannot redefine');
}

$this->matcher->methodNameMatcher = new PHPUnit2_Extensions_MockObject_Matcher_MethodName($constraint);
$this->matcher->methodNameMatcher = new PHPUnit_Extensions_MockObject_Matcher_MethodName($constraint);

return $this;
}
Expand Down
14 changes: 7 additions & 7 deletions Extensions/MockObject/Builder/Match.php
Expand Up @@ -43,14 +43,14 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version SVN: $Id$
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since File available since Release 3.0.0
*/

require_once 'PHPUnit2/Util/Filter.php';
require_once 'PHPUnit2/Extensions/MockObject/Builder/Stub.php';
require_once 'PHPUnit/Util/Filter.php';
require_once 'PHPUnit/Extensions/MockObject/Builder/Stub.php';

PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

/**
* Builder interface for invocation order matches.
Expand All @@ -62,17 +62,17 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version Release: @package_version@
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since Interface available since Release 3.0.0
*/
interface PHPUnit2_Extensions_MockObject_Builder_Match extends PHPUnit2_Extensions_MockObject_Builder_Stub
interface PHPUnit_Extensions_MockObject_Builder_Match extends PHPUnit_Extensions_MockObject_Builder_Stub
{
/**
* Defines the expectation which must occur before the current is valid.
*
* @param string $id The identification of the expectation that should
* occur before this one.
* @return PHPUnit2_Extensions_MockObject_Builder_Stub
* @return PHPUnit_Extensions_MockObject_Builder_Stub
*/
public function after($id);
}
Expand Down
18 changes: 9 additions & 9 deletions Extensions/MockObject/Builder/MethodNameMatch.php
Expand Up @@ -43,14 +43,14 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version SVN: $Id$
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since File available since Release 3.0.0
*/

require_once 'PHPUnit2/Util/Filter.php';
require_once 'PHPUnit2/Extensions/MockObject/Builder/ParametersMatch.php';
require_once 'PHPUnit/Util/Filter.php';
require_once 'PHPUnit/Extensions/MockObject/Builder/ParametersMatch.php';

PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

/**
* Builder interface for matcher of method names.
Expand All @@ -62,19 +62,19 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version Release: @package_version@
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since Interface available since Release 3.0.0
*/
interface PHPUnit2_Extensions_MockObject_Builder_MethodNameMatch extends PHPUnit2_Extensions_MockObject_Builder_ParametersMatch
interface PHPUnit_Extensions_MockObject_Builder_MethodNameMatch extends PHPUnit_Extensions_MockObject_Builder_ParametersMatch
{
/**
* Adds a new method name match and returns the parameter match object for
* further matching possibilities.
*
* @param PHPUnit2_Framework_Constraint $name Constraint for matching method, if a
* @param PHPUnit_Framework_Constraint $name Constraint for matching method, if a
* string is passed it will use the
* PHPUnit2_Framework_Constraint_IsEqual.
* @return PHPUnit2_Extensions_MockObject_Builder_ParametersMatch
* PHPUnit_Framework_Constraint_IsEqual.
* @return PHPUnit_Extensions_MockObject_Builder_ParametersMatch
*/
public function method($name);
}
Expand Down
20 changes: 10 additions & 10 deletions Extensions/MockObject/Builder/Namespace.php
Expand Up @@ -43,19 +43,19 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version SVN: $Id$
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since File available since Release 3.0.0
*/

require_once 'PHPUnit2/Util/Filter.php';
require_once 'PHPUnit2/Extensions/MockObject/Builder/Match.php';
require_once 'PHPUnit/Util/Filter.php';
require_once 'PHPUnit/Extensions/MockObject/Builder/Match.php';

PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

/**
* Interface for builders which can register builders with a given identification.
*
* This interface relates to PHPUnit2_Extensions_MockObject_Builder_Identity.
* This interface relates to PHPUnit_Extensions_MockObject_Builder_Identity.
*
* @category Testing
* @package PHPUnit2
Expand All @@ -64,16 +64,16 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version Release: @package_version@
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since Interface available since Release 3.0.0
*/
interface PHPUnit2_Extensions_MockObject_Builder_Namespace
interface PHPUnit_Extensions_MockObject_Builder_Namespace
{
/**
* Looks up the match builder with identification $id and returns it.
*
* @param string $id The identifiction of the match builder.
* @return PHPUnit2_Extensions_MockObject_Builder_Match
* @return PHPUnit_Extensions_MockObject_Builder_Match
*/
public function lookupId($id);

Expand All @@ -83,9 +83,9 @@ public function lookupId($id);
* has been invoked.
*
* @param string $id The identification of the match builder.
* @param PHPUnit2_Extensions_MockObject_Builder_Match $builder The builder which is being registered.
* @param PHPUnit_Extensions_MockObject_Builder_Match $builder The builder which is being registered.
*/
public function registerId($id, PHPUnit2_Extensions_MockObject_Builder_Match $builder);
public function registerId($id, PHPUnit_Extensions_MockObject_Builder_Match $builder);
}

/*
Expand Down
22 changes: 11 additions & 11 deletions Extensions/MockObject/Builder/ParametersMatch.php
Expand Up @@ -43,14 +43,14 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version SVN: $Id$
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since File available since Release 3.0.0
*/

require_once 'PHPUnit2/Util/Filter.php';
require_once 'PHPUnit2/Extensions/MockObject/Builder/Match.php';
require_once 'PHPUnit/Util/Filter.php';
require_once 'PHPUnit/Extensions/MockObject/Builder/Match.php';

PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');

/**
* Builder interface for parameter matchers.
Expand All @@ -62,27 +62,27 @@
* @copyright 2002-2006 Sebastian Bergmann <sb@sebastian-bergmann.de>
* @license http://www.opensource.org/licenses/bsd-license.php BSD License
* @version Release: @package_version@
* @link http://pear.php.net/package/PHPUnit2
* @link http://www.phpunit.de/
* @since Interface available since Release 3.0.0
*/
interface PHPUnit2_Extensions_MockObject_Builder_ParametersMatch extends PHPUnit2_Extensions_MockObject_Builder_Match
interface PHPUnit_Extensions_MockObject_Builder_ParametersMatch extends PHPUnit_Extensions_MockObject_Builder_Match
{
/**
* Sets the parameters to match for, each parameter to this funtion will
* be part of match. To perform specific matches or constraints create a
* new PHPUnit2_Framework_Constraint and use it for the parameter.
* new PHPUnit_Framework_Constraint and use it for the parameter.
* If the parameter value is not a constraint it will use the
* PHPUnit2_Framework_Constraint_IsEqual for the value.
* PHPUnit_Framework_Constraint_IsEqual for the value.
*
* Some examples:
* <code>
* // match first parameter with value 2
* $b->with(2);
* // match first parameter with value 'smock' and second identical to 42
* $b->with('smock', new PHPUnit2_Framework_Constraint_IsEqual(42));
* $b->with('smock', new PHPUnit_Framework_Constraint_IsEqual(42));
* </code>
*
* @return PHPUnit2_Extensions_MockObject_Builder_ParametersMatch
* @return PHPUnit_Extensions_MockObject_Builder_ParametersMatch
*/
public function with();

Expand All @@ -95,7 +95,7 @@ public function with();
* $b->withAnyParamers();
* </code>
*
* @return PHPUnit2_Extensions_MockObject_Matcher_AnyParameters
* @return PHPUnit_Extensions_MockObject_Matcher_AnyParameters
*/
public function withAnyParameters();
}
Expand Down

0 comments on commit 6b0d2d5

Please sign in to comment.