Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Post-PEAR cleanup, phase one: PHPUnit2_* -> PHPUnit_*, pear.php.net -…

…> phpunit.de, etc.
  • Loading branch information...
commit 6b0d2d5a14b08c86c62c3888777b7f2b0c1aeff8 1 parent 8b8c705
@sebastianbergmann authored
Showing with 2,027 additions and 2,015 deletions.
  1. +6 −6 Extensions/ExceptionTestCase.php
  2. +6 −6 Extensions/MockObject/Builder/Identity.php
  3. +15 −15 Extensions/MockObject/Builder/InvocationMocker.php
  4. +7 −7 Extensions/MockObject/Builder/Match.php
  5. +9 −9 Extensions/MockObject/Builder/MethodNameMatch.php
  6. +10 −10 Extensions/MockObject/Builder/Namespace.php
  7. +11 −11 Extensions/MockObject/Builder/ParametersMatch.php
  8. +9 −9 Extensions/MockObject/Builder/Stub.php
  9. +8 −8 Extensions/MockObject/Invocation.php
  10. +19 −19 Extensions/MockObject/InvocationMocker.php
  11. +11 −11 Extensions/MockObject/Invokable.php
  12. +25 −25 Extensions/MockObject/Matcher.php
  13. +8 −8 Extensions/MockObject/Matcher/AnyParameters.php
  14. +12 −12 Extensions/MockObject/Matcher/Invocation.php
  15. +12 −12 Extensions/MockObject/Matcher/InvokedAtIndex.php
  16. +8 −8 Extensions/MockObject/Matcher/InvokedAtLeastOnce.php
  17. +13 −13 Extensions/MockObject/Matcher/InvokedCount.php
  18. +9 −9 Extensions/MockObject/Matcher/InvokedRecorder.php
  19. +11 −11 Extensions/MockObject/Matcher/MethodName.php
  20. +13 −13 Extensions/MockObject/Matcher/Parameters.php
  21. +8 −8 Extensions/MockObject/Matcher/StatelessInvocation.php
  22. +18 −18 Extensions/MockObject/Mock.php
  23. +14 −14 Extensions/MockObject/MockObject.php
  24. +11 −11 Extensions/MockObject/Stub.php
  25. +9 −9 Extensions/MockObject/Stub/ConsecutiveCalls.php
  26. +8 −8 Extensions/MockObject/Stub/MatcherCollection.php
  27. +8 −8 Extensions/MockObject/Stub/Return.php
  28. +6 −6 Extensions/MockObject/Verifiable.php
  29. +6 −6 Extensions/OutputTestCase.php
  30. +9 −9 Extensions/PerformanceTestCase.php
  31. +12 −12 Extensions/RepeatedTest.php
  32. +16 −16 Extensions/TestDecorator.php
  33. +11 −11 Extensions/TestSetup.php
  34. +21 −21 Framework.php
  35. +99 −97 Framework/Assert.php
  36. +7 −7 Framework/AssertionFailedError.php
  37. +23 −23 Framework/ComparisonFailure.php
  38. +7 −7 Framework/ComparisonFailure/Array.php
  39. +9 −9 Framework/ComparisonFailure/Object.php
  40. +6 −6 Framework/ComparisonFailure/Scalar.php
  41. +6 −6 Framework/ComparisonFailure/String.php
  42. +6 −6 Framework/ComparisonFailure/Type.php
  43. +24 −24 Framework/Constraint.php
  44. +9 −9 Framework/Constraint/And.php
  45. +8 −8 Framework/Constraint/ArrayHasKey.php
  46. +8 −8 Framework/Constraint/FileExists.php
  47. +9 −9 Framework/Constraint/GreaterThan.php
  48. +6 −6 Framework/Constraint/IsAnything.php
  49. +12 −12 Framework/Constraint/IsEqual.php
  50. +9 −9 Framework/Constraint/IsIdentical.php
  51. +9 −9 Framework/Constraint/IsInstanceOf.php
  52. +10 −10 Framework/Constraint/IsType.php
  53. +9 −9 Framework/Constraint/LessThan.php
  54. +9 −9 Framework/Constraint/Not.php
  55. +8 −8 Framework/Constraint/ObjectHasAttribute.php
  56. +10 −10 Framework/Constraint/Or.php
  57. +8 −8 Framework/Constraint/PCREMatch.php
  58. +8 −8 Framework/Constraint/StringContains.php
  59. +8 −8 Framework/Constraint/TraversableContains.php
  60. +6 −6 Framework/Error.php
  61. +9 −9 Framework/ExpectationFailedException.php
  62. +6 −6 Framework/IncompleteTest.php
  63. +8 −8 Framework/IncompleteTestError.php
  64. +6 −6 Framework/SelfDescribing.php
  65. +6 −6 Framework/SkippedTest.php
  66. +8 −8 Framework/SkippedTestError.php
  67. +12 −10 Framework/Test.php
  68. +35 −33 Framework/TestCase.php
  69. +11 −11 Framework/TestFailure.php
  70. +26 −24 Framework/TestListener.php
  71. +46 −46 Framework/TestResult.php
  72. +40 −38 Framework/TestSuite.php
  73. +7 −7 Framework/Warning.php
  74. +31 −31 Runner/BaseTestRunner.php
  75. +9 −9 Runner/IncludePathTestCollector.php
  76. +9 −9 Runner/StandardTestSuiteLoader.php
  77. +5 −5 Runner/TestCollector.php
  78. +5 −5 Runner/TestFilterIterator.php
  79. +5 −5 Runner/TestSuiteLoader.php
  80. +5 −5 Runner/Version.php
  81. +2 −2 Samples/BankAccount/BankAccount.php
  82. +4 −4 Samples/BankAccount/BankAccountTest.php
  83. +2 −2 Samples/Money/IMoney.php
  84. +2 −2 Samples/Money/Money.php
  85. +2 −2 Samples/Money/MoneyBag.php
  86. +4 −4 Samples/Money/MoneyTest.php
  87. +11 −11 Tests/AllTests.php
  88. +12 −12 Tests/Extensions/AllTests.php
  89. +4 −4 Tests/Extensions/ExceptionTestCaseTest.php
  90. +9 −9 Tests/Extensions/ExtensionTest.php
  91. +6 −6 Tests/Extensions/MockObjectTest.php
  92. +4 −4 Tests/Extensions/OutputTestCaseTest.php
  93. +6 −6 Tests/Extensions/PerformanceTestCaseTest.php
  94. +12 −12 Tests/Extensions/RepeatedTestTest.php
  95. +12 −12 Tests/Framework/AllTests.php
  96. +76 −76 Tests/Framework/AssertTest.php
  97. +13 −13 Tests/Framework/ComparisonFailureTest.php
  98. +16 −16 Tests/Framework/SuiteTest.php
  99. +10 −10 Tests/Framework/TestCaseTest.php
  100. +6 −6 Tests/Framework/TestImplementorTest.php
  101. +15 −15 Tests/Framework/TestListenerTest.php
  102. +12 −12 Tests/Runner/AllTests.php
  103. +4 −4 Tests/Runner/BaseTestRunnerTest.php
  104. +11 −11 Tests/Util/AllTests.php
  105. +11 −11 Tests/Util/TestDox/AllTests.php
  106. +6 −6 Tests/Util/TestDox/NamePrettifierTest.php
  107. +4 −4 Tests/_files/AnInterface.php
  108. +4 −4 Tests/_files/ClassWithNonPublicAttributes.php
  109. +8 −8 Tests/_files/DoubleTestCase.php
  110. +6 −6 Tests/_files/Error.php
  111. +6 −6 Tests/_files/Failure.php
  112. +4 −4 Tests/_files/InheritedTestCase.php
  113. +8 −8 Tests/_files/MockRunner.php
  114. +6 −6 Tests/_files/NoArgTestCaseTest.php
  115. +4 −4 Tests/_files/NoTestCaseClass.php
  116. +6 −6 Tests/_files/NoTestCases.php
  117. +4 −4 Tests/_files/NonStatic.php
  118. +6 −6 Tests/_files/NotPublicTestCase.php
  119. +6 −6 Tests/_files/NotVoidTestCase.php
  120. +6 −6 Tests/_files/OneTestCase.php
  121. +6 −6 Tests/_files/OutputTestCase.php
  122. +4 −4 Tests/_files/OverrideTestCase.php
  123. +4 −4 Tests/_files/SampleClass.php
  124. +4 −4 Tests/_files/SetupFailure.php
  125. +6 −6 Tests/_files/Sleep.php
  126. +6 −6 Tests/_files/Success.php
  127. +4 −4 Tests/_files/TearDownFailure.php
  128. +4 −4 Tests/_files/TestIterator.php
  129. +6 −6 Tests/_files/ThrowExceptionTestCase.php
  130. +6 −6 Tests/_files/ThrowNoExceptionTestCase.php
  131. +6 −6 Tests/_files/TornDown.php
  132. +6 −6 Tests/_files/TornDown2.php
  133. +4 −4 Tests/_files/TornDown3.php
  134. +4 −4 Tests/_files/TornDown4.php
  135. +4 −4 Tests/_files/TornDown5.php
  136. +4 −4 Tests/_files/TornDown6.php
  137. +6 −6 Tests/_files/WasRun.php
  138. +45 −45 TextUI/ResultPrinter.php
  139. +71 −69 TextUI/TestRunner.php
  140. +5 −5 Util/Array.php
  141. +7 −7 Util/ErrorHandler.php
  142. +5 −5 Util/Fileloader.php
  143. +5 −5 Util/Filesystem.php
  144. +4 −4 Util/Filter.php
  145. +5 −5 Util/Getopt.php
  146. +25 −25 Util/Log/Eclipse.php
  147. +32 −32 Util/Log/GraphViz.php
  148. +23 −23 Util/Log/PEAR.php
  149. +29 −29 Util/Log/TAP.php
  150. +31 −31 Util/Log/XML.php
  151. +5 −5 Util/Printer.php
  152. +12 −12 Util/Report.php
  153. +24 −24 Util/Report/Coverage/Factory.php
  154. +15 −15 Util/Report/Coverage/Node.php
  155. +27 −27 Util/Report/Coverage/Node/Directory.php
  156. +18 −18 Util/Report/Coverage/Node/File.php
  157. +23 −23 Util/Report/Test/Factory.php
  158. +15 −15 Util/Report/Test/Node.php
  159. +18 −18 Util/Report/Test/Node/Test.php
  160. +36 −36 Util/Report/Test/Node/TestSuite.php
  161. +8 −8 Util/Skeleton.php
  162. +10 −10 Util/Skeleton/TestClass.php
  163. +5 −5 Util/Template.php
  164. +14 −14 Util/Test.php
  165. +5 −5 Util/TestDox/NamePrettifier.php
  166. +30 −30 Util/TestDox/ResultPrinter.php
  167. +6 −6 Util/TestDox/ResultPrinter/HTML.php
  168. +6 −6 Util/TestDox/ResultPrinter/Text.php
  169. +5 −5 Util/Timer.php
  170. +21 −21 package.xml
  171. +1 −1  pear-phpunit
  172. +1 −1  pear-phpunit.bat
View
12 Extensions/ExceptionTestCase.php
@@ -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.
@@ -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.
View
12 Extensions/MockObject/Builder/Identity.php
@@ -43,13 +43,13 @@
* @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.
@@ -57,7 +57,7 @@
* 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
@@ -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.
View
30 Extensions/MockObject/Builder/InvocationMocker.php
@@ -43,16 +43,16 @@
* @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.
@@ -60,7 +60,7 @@
* 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
@@ -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);
}
@@ -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;
@@ -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;
}
@@ -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;
}
@@ -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;
}
View
14 Extensions/MockObject/Builder/Match.php
@@ -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.
@@ -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);
}
View
18 Extensions/MockObject/Builder/MethodNameMatch.php
@@ -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.
@@ -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);
}
View
20 Extensions/MockObject/Builder/Namespace.php
@@ -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
@@ -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);
@@ -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);
}
/*
View
22 Extensions/MockObject/Builder/ParametersMatch.php
@@ -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.
@@ -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();
@@ -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();
}
View
18 Extensions/MockObject/Builder/Stub.php
@@ -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/Identity.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Builder/Identity.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Builder interface for stubs which are actions replacing an invocation.
@@ -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_Stub extends PHPUnit2_Extensions_MockObject_Builder_Identity
+interface PHPUnit_Extensions_MockObject_Builder_Stub extends PHPUnit_Extensions_MockObject_Builder_Identity
{
/**
* Stubs the matching method with the stub object $stub. Any invocations of
* the matched method will now be handled by the stub instead.
*
- * @param PHPUnit2_Extensions_MockObject_Stub $stub The stub object.
- * @return PHPUnit2_Extensions_MockObject_Builder_Identity
+ * @param PHPUnit_Extensions_MockObject_Stub $stub The stub object.
+ * @return PHPUnit_Extensions_MockObject_Builder_Identity
*/
- public function will(PHPUnit2_Extensions_MockObject_Stub $stub);
+ public function will(PHPUnit_Extensions_MockObject_Stub $stub);
}
/*
View
16 Extensions/MockObject/Invocation.php
@@ -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/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');
/**
* Encapsulates information on a method invocation which can be passed to matchers.
@@ -58,7 +58,7 @@
* The invocation consists of the object it occured from, the class name, the
* method name and all the parameters. The mock object must instantiate this
* class with the values from the mocked method and pass it to an object of
- * PHPUnit2_Extensions_MockObject_Invokable.
+ * PHPUnit_Extensions_MockObject_Invokable.
*
* @category Testing
* @package PHPUnit2
@@ -67,10 +67,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 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Invocation implements PHPUnit2_Framework_SelfDescribing
+class PHPUnit_Extensions_MockObject_Invocation implements PHPUnit_Framework_SelfDescribing
{
public $object;
@@ -95,7 +95,7 @@ public function toString()
$this->className,
$this->methodName,
- join(', ', array_map(create_function('$a', 'return PHPUnit2_Framework_ComparisonFailure::shortenedExport($a);'), $this->parameters))
+ join(', ', array_map(create_function('$a', 'return PHPUnit_Framework_ComparisonFailure::shortenedExport($a);'), $this->parameters))
);
}
}
View
38 Extensions/MockObject/InvocationMocker.php
@@ -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/InvocationMocker.php';
-require_once 'PHPUnit2/Extensions/MockObject/Builder/Match.php';
-require_once 'PHPUnit2/Extensions/MockObject/Builder/Namespace.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher.php';
-require_once 'PHPUnit2/Extensions/MockObject/Stub.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invokable.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Builder/InvocationMocker.php';
+require_once 'PHPUnit/Extensions/MockObject/Builder/Match.php';
+require_once 'PHPUnit/Extensions/MockObject/Builder/Namespace.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher.php';
+require_once 'PHPUnit/Extensions/MockObject/Stub.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Invokable.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Mocker for invocations which are sent from
- * PHPUnit2_Extensions_MockObject_MockObject objects.
+ * PHPUnit_Extensions_MockObject_MockObject objects.
*
* Keeps track of all expectations and stubs as well as registering
* identifications for builders.
@@ -72,16 +72,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 Class available since Release 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_InvocationMocker implements PHPUnit2_Extensions_MockObject_Stub_MatcherCollection, PHPUnit2_Extensions_MockObject_Invokable, PHPUnit2_Extensions_MockObject_Builder_Namespace
+class PHPUnit_Extensions_MockObject_InvocationMocker implements PHPUnit_Extensions_MockObject_Stub_MatcherCollection, PHPUnit_Extensions_MockObject_Invokable, PHPUnit_Extensions_MockObject_Builder_Namespace
{
private $matchers = array();
private $builderMap = array();
- public function addMatcher(PHPUnit2_Extensions_MockObject_Matcher_Invocation $matcher)
+ public function addMatcher(PHPUnit_Extensions_MockObject_Matcher_Invocation $matcher)
{
$this->matchers[] = $matcher;
}
@@ -95,7 +95,7 @@ public function lookupId($id)
return NULL;
}
- public function registerId($id, PHPUnit2_Extensions_MockObject_Builder_Match $builder)
+ public function registerId($id, PHPUnit_Extensions_MockObject_Builder_Match $builder)
{
if (isset($this->builderMap[$id])) {
throw new RuntimeException("Match builder with id <{$id}> is already registered.");
@@ -104,14 +104,14 @@ public function registerId($id, PHPUnit2_Extensions_MockObject_Builder_Match $bu
$this->builderMap[$id] = $builder;
}
- public function expects(PHPUnit2_Extensions_MockObject_Matcher_Invocation $matcher)
+ public function expects(PHPUnit_Extensions_MockObject_Matcher_Invocation $matcher)
{
- $builder = new PHPUnit2_Extensions_MockObject_Builder_InvocationMocker($this, $matcher);
+ $builder = new PHPUnit_Extensions_MockObject_Builder_InvocationMocker($this, $matcher);
return $builder;
}
- public function invoke(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function invoke(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
$hasReturnValue = FALSE;
$returnValue = NULL;
@@ -130,7 +130,7 @@ public function invoke(PHPUnit2_Extensions_MockObject_Invocation $invocation)
return $returnValue;
}
- public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function matches(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
foreach($this->matchers as $matcher) {
if (!$matcher->matches($invocation)) {
View
22 Extensions/MockObject/Invokable.php
@@ -43,15 +43,15 @@
* @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/Invocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Verifiable.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Verifiable.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Interface for classes which can be invoked.
@@ -66,29 +66,29 @@
* @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_Invokable extends PHPUnit2_Extensions_MockObject_Verifiable
+interface PHPUnit_Extensions_MockObject_Invokable extends PHPUnit_Extensions_MockObject_Verifiable
{
/**
* Invokes the invocation object $invocation so that it can be checked for
* expectations or matched against stubs.
*
* @return Object
- * @param PHPUnit2_Extensions_MockObject_Invocation $invocation The invocation object passed from
+ * @param PHPUnit_Extensions_MockObject_Invocation $invocation The invocation object passed from
* mock object.
*/
- public function invoke(PHPUnit2_Extensions_MockObject_Invocation $invocation);
+ public function invoke(PHPUnit_Extensions_MockObject_Invocation $invocation);
/**
* Checks if the invocation matches.
*
* @return bool
- * @param PHPUnit2_Extensions_MockObject_Invocation $invocation The invocation object passed from
+ * @param PHPUnit_Extensions_MockObject_Invocation $invocation The invocation object passed from
* mock object.
*/
- public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation);
+ public function matches(PHPUnit_Extensions_MockObject_Invocation $invocation);
}
/*
View
50 Extensions/MockObject/Matcher.php
@@ -43,16 +43,16 @@
* @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/Framework.php';
-require_once 'PHPUnit2/Util/Filter.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/Invocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/Invocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Main matcher which defines a full expectation using method, parameter and invocation matchers.
@@ -70,10 +70,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 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Matcher implements PHPUnit2_Extensions_MockObject_Matcher_Invocation
+class PHPUnit_Extensions_MockObject_Matcher implements PHPUnit_Extensions_MockObject_Matcher_Invocation
{
public $invocationMatcher;
@@ -87,7 +87,7 @@ class PHPUnit2_Extensions_MockObject_Matcher implements PHPUnit2_Extensions_Mock
public $stub = NULL;
- public function __construct(PHPUnit2_Extensions_MockObject_Matcher_Invocation $invocationMatcher)
+ public function __construct(PHPUnit_Extensions_MockObject_Matcher_Invocation $invocationMatcher)
{
$this->invocationMatcher = $invocationMatcher;
}
@@ -119,7 +119,7 @@ public function toString()
return join(' ', $list);
}
- public function invoked(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function invoked(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
if ($this->invocationMatcher === NULL) {
throw new RuntimeException('No invocation matcher is set');
@@ -158,8 +158,8 @@ public function invoked(PHPUnit2_Extensions_MockObject_Invocation $invocation)
}
}
- catch (PHPUnit2_Framework_ExpectationFailedException $e) {
- throw new PHPUnit2_Framework_ExpectationFailedException(
+ catch (PHPUnit_Framework_ExpectationFailedException $e) {
+ throw new PHPUnit_Framework_ExpectationFailedException(
sprintf(
"Expectation failed for %s when %s\n%s",
@@ -178,7 +178,7 @@ public function invoked(PHPUnit2_Extensions_MockObject_Invocation $invocation)
return NULL;
}
- public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function matches(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
if ($this->afterMatchBuilderId !== NULL) {
$builder = $invocation->object->getInvocationMocker()->lookupId($this->afterMatchBuilderId);
@@ -222,8 +222,8 @@ public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation)
}
}
- catch (PHPUnit2_Framework_ExpectationFailedException $e) {
- throw new PHPUnit2_Framework_ExpectationFailedException(
+ catch (PHPUnit_Framework_ExpectationFailedException $e) {
+ throw new PHPUnit_Framework_ExpectationFailedException(
sprintf(
"Expectation failed for %s when %s\n%s",
@@ -260,8 +260,8 @@ public function verify()
}
}
- catch (PHPUnit2_Framework_ExpectationFailedException $e) {
- throw new PHPUnit2_Framework_ExpectationFailedException(
+ catch (PHPUnit_Framework_ExpectationFailedException $e) {
+ throw new PHPUnit_Framework_ExpectationFailedException(
sprintf(
"Expectation failed for %s when %s\n%s",
@@ -275,14 +275,14 @@ public function verify()
}
}
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/AnyParameters.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/InvokedAtIndex.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/InvokedAtLeastOnce.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/InvokedCount.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/InvokedRecorder.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/MethodName.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/Parameters.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/StatelessInvocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/AnyParameters.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/InvokedAtIndex.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/InvokedAtLeastOnce.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/InvokedCount.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/InvokedRecorder.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/MethodName.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/Parameters.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/StatelessInvocation.php';
/*
* Local variables:
View
16 Extensions/MockObject/Matcher/AnyParameters.php
@@ -43,15 +43,15 @@
* @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/Matcher/StatelessInvocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/StatelessInvocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Invocation matcher which allos any parameters to a method.
@@ -63,17 +63,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 Class available since Release 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Matcher_AnyParameters extends PHPUnit2_Extensions_MockObject_Matcher_StatelessInvocation
+class PHPUnit_Extensions_MockObject_Matcher_AnyParameters extends PHPUnit_Extensions_MockObject_Matcher_StatelessInvocation
{
public function toString()
{
return 'with any parameters';
}
- public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function matches(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
return TRUE;
}
View
24 Extensions/MockObject/Matcher/Invocation.php
@@ -43,16 +43,16 @@
* @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/Framework.php';
-require_once 'PHPUnit2/Util/Filter.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Verifiable.php';
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Verifiable.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Interface for classes which matches an invocation based on its
@@ -65,10 +65,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_Matcher_Invocation extends PHPUnit2_Framework_SelfDescribing, PHPUnit2_Extensions_MockObject_Verifiable
+interface PHPUnit_Extensions_MockObject_Matcher_Invocation extends PHPUnit_Framework_SelfDescribing, PHPUnit_Extensions_MockObject_Verifiable
{
/**
* Registers the invocation $invocation in the object as being invoked.
@@ -81,22 +81,22 @@
*
* If the matcher is a stub it will also have a return value.
*
- * @param PHPUnit2_Extensions_MockObject_Invocation Object containing information on a mocked or
+ * @param PHPUnit_Extensions_MockObject_Invocation Object containing information on a mocked or
* stubbed method which was invoked.
* @return mixed
*/
- public function invoked(PHPUnit2_Extensions_MockObject_Invocation $invocation);
+ public function invoked(PHPUnit_Extensions_MockObject_Invocation $invocation);
/**
* Checks if the invocation $invocation matches the current rules. If it does
* the matcher will get the invoked() method called which should check if an
* expectation is met.
*
- * @param PHPUnit2_Extensions_MockObject_Invocation Object containing information on a mocked or
+ * @param PHPUnit_Extensions_MockObject_Invocation Object containing information on a mocked or
* stubbed method which was invoked.
* @return bool
*/
- public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation);
+ public function matches(PHPUnit_Extensions_MockObject_Invocation $invocation);
}
/*
View
24 Extensions/MockObject/Matcher/InvokedAtIndex.php
@@ -43,16 +43,16 @@
* @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/Framework.php';
-require_once 'PHPUnit2/Util/Filter.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/Invocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/Invocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Invocation matcher which checks if a method was invoked at a certain index.
@@ -71,10 +71,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 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Matcher_InvokedAtIndex implements PHPUnit2_Extensions_MockObject_Matcher_Invocation
+class PHPUnit_Extensions_MockObject_Matcher_InvokedAtIndex implements PHPUnit_Extensions_MockObject_Matcher_Invocation
{
private $sequenceIndex;
@@ -90,27 +90,27 @@ public function toString()
return 'invoked at sequence index ' . $this->sequenceIndex;
}
- public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function matches(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
++$this->currentIndex;
return $this->currentIndex == $this->sequenceIndex;
}
- public function invoked(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function invoked(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
}
public function verify()
{
if ($this->currentIndex < $this->sequenceIndex) {
- throw new PHPUnit2_Framework_ExpectationFailedException(
+ throw new PHPUnit_Framework_ExpectationFailedException(
sprintf(
'The expected invocation at index %s was never reached.',
$this->sequenceIndex
),
- new PHPUnit2_Framework_ComparisonFailure_Scalar($this->sequenceIndex, $this->currentIndex)
+ new PHPUnit_Framework_ComparisonFailure_Scalar($this->sequenceIndex, $this->currentIndex)
);
}
}
View
16 Extensions/MockObject/Matcher/InvokedAtLeastOnce.php
@@ -43,15 +43,15 @@
* @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/Framework.php';
-require_once 'PHPUnit2/Util/Filter.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/InvokedRecorder.php';
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/InvokedRecorder.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Invocation matcher which checks if a method has been invoked at least one time.
@@ -65,10 +65,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 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Matcher_InvokedAtLeastOnce extends PHPUnit2_Extensions_MockObject_Matcher_InvokedRecorder
+class PHPUnit_Extensions_MockObject_Matcher_InvokedAtLeastOnce extends PHPUnit_Extensions_MockObject_Matcher_InvokedRecorder
{
public function toString()
{
@@ -80,7 +80,7 @@ public function verify()
$count = $this->getInvocationCount();
if ($count < 1) {
- throw new PHPUnit2_Framework_ExpectationFailedException(
+ throw new PHPUnit_Framework_ExpectationFailedException(
'Expected invocation at least once but it never occured.'
);
}
View
26 Extensions/MockObject/Matcher/InvokedCount.php
@@ -43,16 +43,16 @@
* @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/Framework.php';
-require_once 'PHPUnit2/Util/Filter.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/InvokedRecorder.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/InvokedRecorder.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Invocation matcher which checks if a method has been invoked a certain amount of times.
@@ -67,10 +67,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 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Matcher_InvokedCount extends PHPUnit2_Extensions_MockObject_Matcher_InvokedRecorder
+class PHPUnit_Extensions_MockObject_Matcher_InvokedCount extends PHPUnit_Extensions_MockObject_Matcher_InvokedRecorder
{
private $expectedCount;
@@ -84,20 +84,20 @@ public function toString()
return 'invoked ' . $this->expectedCount . ' time(s)';
}
- public function invoked(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function invoked(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
parent::invoked($invocation);
$count = $this->getInvocationCount();
if ($count > $this->expectedCount) {
- throw new PHPUnit2_Framework_ExpectationFailedException(
+ throw new PHPUnit_Framework_ExpectationFailedException(
sprintf(
'Expected count for invocation <%s> is wrong.',
$invocation->toString()
),
- new PHPUnit2_Framework_ComparisonFailure_Scalar($this->expectedCount, $count)
+ new PHPUnit_Framework_ComparisonFailure_Scalar($this->expectedCount, $count)
);
}
}
@@ -107,9 +107,9 @@ public function verify()
$count = $this->getInvocationCount();
if ($count !== $this->expectedCount) {
- throw new PHPUnit2_Framework_ExpectationFailedException(
+ throw new PHPUnit_Framework_ExpectationFailedException(
'Expected invocation count for is wrong.',
- new PHPUnit2_Framework_ComparisonFailure_Scalar($this->expectedCount, $count)
+ new PHPUnit_Framework_ComparisonFailure_Scalar($this->expectedCount, $count)
);
}
}
View
18 Extensions/MockObject/Matcher/InvokedRecorder.php
@@ -43,15 +43,15 @@
* @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/Matcher/Invocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/Invocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Records invocations and provides convenience methods for checking them later on.
@@ -66,11 +66,11 @@
* @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
* @abstract
*/
-abstract class PHPUnit2_Extensions_MockObject_Matcher_InvokedRecorder implements PHPUnit2_Extensions_MockObject_Matcher_Invocation
+abstract class PHPUnit_Extensions_MockObject_Matcher_InvokedRecorder implements PHPUnit_Extensions_MockObject_Matcher_Invocation
{
private $invocations = array();
@@ -89,12 +89,12 @@ public function hasBeenInvoked()
return count($this->invocations) > 0;
}
- public function invoked(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function invoked(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
$this->invocations[] = $invocation;
}
- public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function matches(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
return TRUE;
}
View
22 Extensions/MockObject/Matcher/MethodName.php
@@ -43,16 +43,16 @@
* @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/Framework.php';
-require_once 'PHPUnit2/Util/Filter.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/StatelessInvocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/StatelessInvocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Invocation matcher which looks for a specific method name in the invocations.
@@ -68,17 +68,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 Class available since Release 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Matcher_MethodName extends PHPUnit2_Extensions_MockObject_Matcher_StatelessInvocation
+class PHPUnit_Extensions_MockObject_Matcher_MethodName extends PHPUnit_Extensions_MockObject_Matcher_StatelessInvocation
{
private $constraint;
public function __construct($constraint)
{
- if (!($constraint instanceof PHPUnit2_Framework_Constraint)) {
- $constraint = new PHPUnit2_Framework_Constraint_IsEqual($constraint);
+ if (!($constraint instanceof PHPUnit_Framework_Constraint)) {
+ $constraint = new PHPUnit_Framework_Constraint_IsEqual($constraint);
}
$this->constraint = $constraint;
@@ -89,7 +89,7 @@ public function toString()
return 'method name ' . $this->constraint->toString();
}
- public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function matches(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
return $this->constraint->evaluate($invocation->methodName);
}
View
26 Extensions/MockObject/Matcher/Parameters.php
@@ -43,16 +43,16 @@
* @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/Framework.php';
-require_once 'PHPUnit2/Util/Filter.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher/StatelessInvocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/StatelessInvocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Invocation matcher which looks for specific parameters in the invocations.
@@ -68,10 +68,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 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Matcher_Parameters extends PHPUnit2_Extensions_MockObject_Matcher_StatelessInvocation
+class PHPUnit_Extensions_MockObject_Matcher_Parameters extends PHPUnit_Extensions_MockObject_Matcher_StatelessInvocation
{
private $parameters = array();
@@ -80,8 +80,8 @@ class PHPUnit2_Extensions_MockObject_Matcher_Parameters extends PHPUnit2_Extensi
public function __construct($parameters)
{
foreach($parameters as $parameter) {
- if (!($parameter instanceof PHPUnit2_Framework_Constraint)) {
- $parameter = new PHPUnit2_Framework_Constraint_IsEqual($parameter);
+ if (!($parameter instanceof PHPUnit_Framework_Constraint)) {
+ $parameter = new PHPUnit_Framework_Constraint_IsEqual($parameter);
}
$this->parameters[] = $parameter;
@@ -103,7 +103,7 @@ public function toString()
return $text;
}
- public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function matches(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
$this->invocation = $invocation;
$this->verify();
@@ -114,13 +114,13 @@ public function matches(PHPUnit2_Extensions_MockObject_Invocation $invocation)
public function verify()
{
if (count($this->invocation->parameters) < count($this->parameters)) {
- throw new PHPUnit2_Framework_ExpectationFailedException(
+ throw new PHPUnit_Framework_ExpectationFailedException(
sprintf(
'Parameter count for invocation %s is too low.',
$this->invocation->toString()
),
- new PHPUnit2_Framework_ComparisonFailure_Scalar(
+ new PHPUnit_Framework_ComparisonFailure_Scalar(
count($this->parameters),
count($this->invocation->parameters)
)
View
16 Extensions/MockObject/Matcher/StatelessInvocation.php
@@ -43,15 +43,15 @@
* @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/Matcher/Invocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher/Invocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Invocation matcher which does not care about previous state from earlier invocations.
@@ -66,13 +66,13 @@
* @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
* @abstract
*/
-abstract class PHPUnit2_Extensions_MockObject_Matcher_StatelessInvocation implements PHPUnit2_Extensions_MockObject_Matcher_Invocation
+abstract class PHPUnit_Extensions_MockObject_Matcher_StatelessInvocation implements PHPUnit_Extensions_MockObject_Matcher_Invocation
{
- public function invoked(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function invoked(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
}
View
36 Extensions/MockObject/Mock.php
@@ -43,23 +43,23 @@
* @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/Matcher.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/MockObject.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Matcher.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Extensions/MockObject/MockObject.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Provides generation of mock classes and objects from existing classes.
*
* The mocked class will contain all the methods of the original class but with
* a different implementation which will call the current
- * PHPUnit2_Extensions_MockObject_InvocationMocker object, this objects takes
+ * PHPUnit_Extensions_MockObject_InvocationMocker object, this objects takes
* care of checking expectations and stubs.
* It is also possible to define which methods are mocked by passing an array
* of method names.
@@ -67,14 +67,14 @@
* The simplest way to define a mock object is to do:
*
* <code>
- * PHPUnit2_Extensions_MockObject_Mock::generate('MyClass');
+ * PHPUnit_Extensions_MockObject_Mock::generate('MyClass');
* $o = new Mock_MyClass;
* </code>
*
* The generate() method returns an object which can be queried.
*
* <code>
- * $m = PHPUnit2_Extensions_MockObject::generate('MyClass');
+ * $m = PHPUnit_Extensions_MockObject::generate('MyClass');
* $o = new $m->mockClassName;
* print "original class was: . $m->className;
* </code>
@@ -86,10 +86,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 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Mock
+class PHPUnit_Extensions_MockObject_Mock
{
public $mockClassName;
public $className;
@@ -118,7 +118,7 @@ public function __construct($className, Array $methods = array(), $mockClassName
public static function generate($className, Array $methods = array(), $mockClassName = '')
{
- $mock = new PHPUnit2_Extensions_MockObject_Mock($className, $methods, $mockClassName);
+ $mock = new PHPUnit_Extensions_MockObject_Mock($className, $methods, $mockClassName);
if (!class_exists($mock->mockClassName, FALSE)) {
$mock->generateClass();
@@ -155,9 +155,9 @@ protected function generateClassDefinition(ReflectionClass $class)
$code = 'class ';
if ($class->isInterface()) {
- $code .= "{$this->mockClassName} implements {$this->className}, PHPUnit2_Extensions_MockObject_MockObject {\n";
+ $code .= "{$this->mockClassName} implements {$this->className}, PHPUnit_Extensions_MockObject_MockObject {\n";
} else {
- $code .= "{$this->mockClassName} extends {$this->className} implements PHPUnit2_Extensions_MockObject_MockObject {\n";
+ $code .= "{$this->mockClassName} extends {$this->className} implements PHPUnit_Extensions_MockObject_MockObject {\n";
}
$code .= $this->generateMockApi($class);
@@ -225,7 +225,7 @@ protected function generateMethodDefinition(ReflectionMethod $method)
$code .= sprintf(
"%s(%s) {\n" .
" \$args = func_get_args();\n" .
- " return \$this->invocationMocker->invoke(new PHPUnit2_Extensions_MockObject_Invocation(\$this, %s, %s, \$args));\n" .
+ " return \$this->invocationMocker->invoke(new PHPUnit_Extensions_MockObject_Invocation(\$this, %s, %s, \$args));\n" .
" }\n",
$method->getName(),
@@ -246,7 +246,7 @@ protected function generateMockApi(ReflectionClass $class)
" public function getInvocationMocker() {\n" .
" return \$this->invocationMocker;\n" .
" }\n\n" .
- " public function expects(PHPUnit2_Extensions_MockObject_Matcher_Invocation \$matcher) {\n" .
+ " public function expects(PHPUnit_Extensions_MockObject_Matcher_Invocation \$matcher) {\n" .
" return \$this->invocationMocker->expects(\$matcher);\n" .
" }\n\n" .
" public function verify() {\n" .
@@ -265,7 +265,7 @@ protected function generateConstructorCode(ReflectionClass $class)
if ($constructor) {
return sprintf(
" public function __construct(%s) {\n" .
- " \$this->invocationMocker = new PHPUnit2_Extensions_MockObject_InvocationMocker(\$this);\n" .
+ " \$this->invocationMocker = new PHPUnit_Extensions_MockObject_InvocationMocker(\$this);\n" .
" parent::%s(%s);\n" .
" }\n\n",
@@ -275,7 +275,7 @@ protected function generateConstructorCode(ReflectionClass $class)
);
} else {
return " public function __construct() {\n" .
- " \$this->invocationMocker = new PHPUnit2_Extensions_MockObject_InvocationMocker(\$this);\n" .
+ " \$this->invocationMocker = new PHPUnit_Extensions_MockObject_InvocationMocker(\$this);\n" .
" }\n\n";
}
}
View
28 Extensions/MockObject/MockObject.php
@@ -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 'PHPUnit2/Extensions/MockObject/Builder/MethodNameMatch.php';
-require_once 'PHPUnit2/Extensions/MockObject/Matcher.php';
-require_once 'PHPUnit2/Extensions/MockObject/InvocationMocker.php';
-require_once 'PHPUnit2/Extensions/MockObject/Verifiable.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/InvocationMocker.php';
+require_once 'PHPUnit/Extensions/MockObject/Verifiable.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Interface for all mock objects which are generated by
- * PHPUnit2_Extensions_MockObject_Mock.
+ * PHPUnit_Extensions_MockObject_Mock.
*
* @category Testing
* @package PHPUnit2
@@ -66,15 +66,15 @@
* @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_MockObject extends PHPUnit2_Extensions_MockObject_Verifiable
+interface PHPUnit_Extensions_MockObject_MockObject extends PHPUnit_Extensions_MockObject_Verifiable
{
/**
* Returns the current invocation mocker which keeps track of expecations
* and stubs.
- * @return PHPUnit2_Extensions_MockObject_InvocationMocker
+ * @return PHPUnit_Extensions_MockObject_InvocationMocker
*/
public function getInvocationMocker();
@@ -82,10 +82,10 @@ public function getInvocationMocker();
* Registers a new expectation in the mock object and returns the match
* object which can be infused with further details.
*
- * @param PHPUnit2_Extensions_MockObject_Matcher_Invocation $invocation The invocation handler for the method calls.
- * @return PHPUnit2_Extensions_MockObject_Builder_MethodNameMatch
+ * @param PHPUnit_Extensions_MockObject_Matcher_Invocation $invocation The invocation handler for the method calls.
+ * @return PHPUnit_Extensions_MockObject_Builder_MethodNameMatch
*/
- public function expects(PHPUnit2_Extensions_MockObject_Matcher_Invocation $invocation);
+ public function expects(PHPUnit_Extensions_MockObject_Matcher_Invocation $invocation);
}
/*
View
22 Extensions/MockObject/Stub.php
@@ -43,15 +43,15 @@
* @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/Framework.php';
-require_once 'PHPUnit2/Util/Filter.php';
-require_once 'PHPUnit2/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Framework.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* An object that stubs the process of a normal method for a mock object.
@@ -66,25 +66,25 @@
* @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_Stub extends PHPUnit2_Framework_SelfDescribing
+interface PHPUnit_Extensions_MockObject_Stub extends PHPUnit_Framework_SelfDescribing
{
/**
* Fakes the processesing of the invocation $invocation by returning a
* specific value.
*
* @return mixed
- * @param PHPUnit2_Extensions_MockObject_Invocation $invocation The invocation which was mocked
+ * @param PHPUnit_Extensions_MockObject_Invocation $invocation The invocation which was mocked
* and matched by the current method
* and argument matchers.
*/
- public function invoke(PHPUnit2_Extensions_MockObject_Invocation $invocation);
+ public function invoke(PHPUnit_Extensions_MockObject_Invocation $invocation);
}
-require_once 'PHPUnit2/Extensions/MockObject/Stub/MatcherCollection.php';
-require_once 'PHPUnit2/Extensions/MockObject/Stub/Return.php';
+require_once 'PHPUnit/Extensions/MockObject/Stub/MatcherCollection.php';
+require_once 'PHPUnit/Extensions/MockObject/Stub/Return.php';
/*
* Local variables:
View
18 Extensions/MockObject/Stub/ConsecutiveCalls.php
@@ -43,15 +43,15 @@
* @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/Invocation.php';
-require_once 'PHPUnit2/Extensions/MockObject/Stub.php';
+require_once 'PHPUnit/Util/Filter.php';
+require_once 'PHPUnit/Extensions/MockObject/Invocation.php';
+require_once 'PHPUnit/Extensions/MockObject/Stub.php';
-PHPUnit2_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
+PHPUnit_Util_Filter::addFileToFilter(__FILE__, 'PHPUNIT');
/**
* Stubs a method by returning a user-defined stack of values.
@@ -63,10 +63,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 3.0.0
*/
-class PHPUnit2_Extensions_MockObject_Stub_ConsecutiveCalls implements PHPUnit2_Extensions_MockObject_Stub
+class PHPUnit_Extensions_MockObject_Stub_ConsecutiveCalls implements PHPUnit_Extensions_MockObject_Stub
{
private $stack;
private $value;
@@ -76,11 +76,11 @@ public function __construct($stack)
$this->stack = $stack;
}
- public function invoke(PHPUnit2_Extensions_MockObject_Invocation $invocation)
+ public function invoke(PHPUnit_Extensions_MockObject_Invocation $invocation)
{
$this->value = array_shift($this->stack);
- if ($this->value instanceof PHPUnit2_Extensions_MockObject_Stub) {
+ if ($this->value instanceof PHPUnit_Extensions_MockObject_Stub) {
$this->value = $this->value->invoke($invocation);
}
View
16 Extensions/MockObject/Stub/MatcherCollection.php
@@ -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/Matcher.php';