File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99 "php" : " >=5.4.0"
1010 },
1111 "require-dev" : {
12- "phpunit/phpunit" : " ~4.8"
12+ "phpunit/phpunit" : " ~4.8.35 || ~5.7 || ~6.4 "
1313 },
1414 "autoload" : {
1515 "psr-4" : {
Original file line number Diff line number Diff line change @@ -37,11 +37,12 @@ public function getPromiseTestAdapter(callable $canceller = null)
3737 ]);
3838 }
3939
40- /** @test */
40+ /**
41+ * @test
42+ * @expectedException InvalidArgumentException
43+ */
4144 public function shouldThrowExceptionIfConstructedWithAPromise ()
4245 {
43- $ this ->setExpectedException ('\InvalidArgumentException ' );
44-
4546 return new FulfilledPromise (new FulfilledPromise ());
4647 }
4748}
Original file line number Diff line number Diff line change @@ -74,11 +74,13 @@ public function doesNotCallCancelTwiceWhenStartedTwice()
7474 $ cancellationQueue ();
7575 }
7676
77- /** @test */
77+ /**
78+ * @test
79+ * @expectedException Exception
80+ * @expectedExceptionMessage test
81+ */
7882 public function rethrowsExceptionsThrownFromCancel ()
7983 {
80- $ this ->setExpectedException ('\Exception ' , 'test ' );
81-
8284 $ mock = $ this ->createCallableMock ();
8385 $ mock
8486 ->expects ($ this ->once ())
Original file line number Diff line number Diff line change @@ -29,11 +29,13 @@ public function excutesNestedEnqueuedTasks()
2929 $ queue ->enqueue ($ task );
3030 }
3131
32- /** @test */
32+ /**
33+ * @test
34+ * @expectedException Exception
35+ * @expectedException test
36+ */
3337 public function rethrowsExceptionsThrownFromTasks ()
3438 {
35- $ this ->setExpectedException ('\Exception ' , 'test ' );
36-
3739 $ mock = $ this ->createCallableMock ();
3840 $ mock
3941 ->expects ($ this ->once ())
Original file line number Diff line number Diff line change @@ -37,11 +37,12 @@ public function getPromiseTestAdapter(callable $canceller = null)
3737 ]);
3838 }
3939
40- /** @test */
40+ /**
41+ * @test
42+ * @expectedException InvalidArgumentException
43+ */
4144 public function shouldThrowExceptionIfConstructedWithAPromise ()
4245 {
43- $ this ->setExpectedException ('\InvalidArgumentException ' );
44-
4546 return new RejectedPromise (new RejectedPromise ());
4647 }
4748}
Original file line number Diff line number Diff line change 22
33namespace React \Promise ;
44
5- class TestCase extends \PHPUnit_Framework_TestCase
5+ use PHPUnit \Framework \TestCase as BaseTestCase ;
6+
7+ class TestCase extends BaseTestCase
68{
79 public function expectCallableExactly ($ amount )
810 {
You can’t perform that action at this time.
0 commit comments