public function testApiFailure_CallsThenWithValidArguments_ForPendingPromise()
{
$test = $this->getTest();
$callable = function () {
};
$promise = $this->createPromiseMock(['then']);
$promise->expects($test->once())->method('then')->with(null, $callable, null);
$promise->failure($callable);
}