public function testDoesNotTryToFulfillTwiceDuringTrampoline()
 {
     $fp = new FulfilledPromise('a');
     $t1 = $fp->then(function ($v) {
         return $v . ' b';
     });
     $t1->resolve('why!');
     $this->assertEquals('why!', $t1->wait());
 }
 public static function run(callable $callback, $value = null)
 {
     $promise = new FulfilledPromise($value);
     return $promise->then($callback);
 }