Skip to content

Commit

Permalink
fixed null callable
Browse files Browse the repository at this point in the history
  • Loading branch information
aleksandr-yulin committed Mar 12, 2019
1 parent 89f7352 commit b29fdbd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/PromiseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,15 @@ public function testPromise(): void
$promise2 = $promise->then(function ($value) {
return $value + 1;
});
$promise3 = $promise->then(function () {
});
$promise3 = $promise->then();
$promise->then(function ($value) {
$this->assertEquals(41, $value);
});
$promise2->then(function ($value) {
$this->assertEquals(43, $value);
});
$promise3->then(function ($value) {
$this->assertNull($value);
$this->assertEquals(41, $value);
});
$promise->wait();
}
Expand Down

0 comments on commit b29fdbd

Please sign in to comment.