| Conditions | 1 | 
| Paths | 1 | 
| Total Lines | 27 | 
| Code Lines | 18 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php  | 
            ||
| 57 | public function testReject()  | 
            ||
| 58 |     { | 
            ||
| 59 | parent::testReject();  | 
            ||
| 60 | |||
| 61 | $this  | 
            ||
| 62 | ->given(  | 
            ||
| 63 | $reason = new \Exception(),  | 
            ||
| 64 | $onRejected = $this->delegateMock(),  | 
            ||
| 65 | /** @var \Cubiche\Core\Async\Promise\DeferredInterface $deferred */  | 
            ||
| 66 | $deferred = $this->newTestedInstance(  | 
            ||
| 67 | new Deferred(),  | 
            ||
| 68 | null,  | 
            ||
| 69 |                     function () use ($reason) { | 
            ||
| 70 | throw $reason;  | 
            ||
| 71 | }  | 
            ||
| 72 | )  | 
            ||
| 73 | )  | 
            ||
| 74 |             ->when(function () use ($deferred, $onRejected) { | 
            ||
| 75 | $deferred->promise()->then(null, $onRejected);  | 
            ||
| 76 |                 $deferred->reject('foo'); | 
            ||
| 77 | })  | 
            ||
| 78 | ->then()  | 
            ||
| 79 | ->delegateCall($onRejected)  | 
            ||
| 80 | ->withArguments($reason)  | 
            ||
| 81 | ->once()  | 
            ||
| 82 | ;  | 
            ||
| 83 | }  | 
            ||
| 84 | }  | 
            ||
| 85 |