-
-
Notifications
You must be signed in to change notification settings - Fork 149
Preserve the order of the array with all and map functions #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preserve the order of the array with all and map functions #77
Conversation
call_user_func($queue->dequeue()); | ||
|
||
$this->assertSame([1, 2, 3], $result); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see the style of the test matching the rest of the tests. In this case this would something like
/** @test */
public function shouldPreserveTheOrderOfArrayWhenResolvingAsyncPromises()
{
$deferred = new Deferred();
$mock = $this->createCallableMock();
$mock
->expects($this->once())
->method('__invoke')
->with($this->identicalTo([1, 2, 3]));
all([1, $deferred->promise(), 3])
->then($mock);
$deferred->resolve(2);
}
$this->assertSame([2 ,4 ,6], $result); | ||
} | ||
|
||
/** @test */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to see the style of the test matching the rest of the tests (see my comment on the all
test).
@jsor Unified the test style. Sorry about that :). |
Awesome, thanks a lot @lordthorzonus! |
Released in v2.5.0. |
fixes #74
I added the changelog entry for the 2.5.x heading (not sure if this is correct).