@@ -55,12 +55,9 @@ public function testPromiseRejectsIfResolvedWithItself() {
55
55
$ actualMessage = $ reason ->getMessage ();
56
56
});
57
57
58
+ self ::expectExceptionMessage ("A Promise must not be resolved with another Promise. " );
58
59
$ promiseContainer ->resolve ($ sut );
59
60
self ::assertEquals (0 , $ onResolvedCallCount );
60
- self ::assertEquals (
61
- "A Promise must not be resolved with another Promise. " ,
62
- $ actualMessage
63
- );
64
61
}
65
62
66
63
public function testRejectWithException () {
@@ -141,21 +138,6 @@ public function testLatestResolvedValueUsedOnFulfillment() {
141
138
$ promiseContainer ->resolve ("example2 " );
142
139
}
143
140
144
- public function testLatestRejectedReasonUsedOnRejection () {
145
- $ promiseContainer = $ this ->getTestPromiseContainer ();
146
- $ exception1 = new Exception ("First exception " );
147
- $ exception2 = new Exception ("Second exception " );
148
-
149
- $ onFulfilled = self ::mockCallable (0 );
150
- $ onRejected = self ::mockCallable (1 , $ exception1 );
151
-
152
- $ sut = $ promiseContainer ->getPromise ();
153
- $ sut ->then ($ onFulfilled )->catch ($ onRejected );
154
-
155
- $ promiseContainer ->reject ($ exception1 );
156
- $ promiseContainer ->reject ($ exception2 );
157
- }
158
-
159
141
public function testPreResolvedPromiseInvokesOnFulfill () {
160
142
$ promiseContainer = $ this ->getTestPromiseContainer ();
161
143
$ onFulfilled = self ::mockCallable (1 );
@@ -515,8 +497,6 @@ public function testNoCatchMethodBubblesThrowables_internalRejection() {
515
497
$ promiseContainer ->reject ($ expectedException );
516
498
});
517
499
return $ sut ;
518
- })->catch (function (Throwable $ reason ) {
519
- var_dump ($ reason );die ("THIS IS THE REASON " );
520
500
});
521
501
522
502
$ promiseContainer ->resolve ("test " );
0 commit comments