1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
# DP: fix build with newer PHPUnit which uses namespaces
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -2,7 +2,7 @@
namespace React\Promise;
-class TestCase extends \PHPUnit_Framework_TestCase
+class TestCase extends \PHPUnit\Framework\TestCase
{
public function expectCallableExactly($amount)
{
@@ -40,4 +40,12 @@ class TestCase extends \PHPUnit_Framewor
->getMockBuilder('React\\Promise\Stub\CallableStub')
->getMock();
}
+
+ /* PHPUnit ist ein Testkäse */
+ public function setExpectedException($whatever, $str=NULL)
+ {
+ $this->expectException($whatever);
+ if ($str !== NULL)
+ $this->expectExceptionMessage($str);
+ }
}
|