Skip to content

Conversation

@lordthorzonus
Copy link

fixes #74

I added the changelog entry for the 2.5.x heading (not sure if this is correct).

@lordthorzonus lordthorzonus changed the base branch from master to 2.x December 22, 2016 10:24
call_user_func($queue->dequeue());

$this->assertSame([1, 2, 3], $result);
}
Copy link
Member

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);
}

Copy link
Member

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).

@lordthorzonus
Copy link
Author

@jsor Unified the test style. Sorry about that :).

@jsor jsor merged commit 53799ed into reactphp:2.x Dec 22, 2016
@jsor
Copy link
Member

jsor commented Dec 22, 2016

Awesome, thanks a lot @lordthorzonus!

@jsor
Copy link
Member

jsor commented Dec 22, 2016

Released in v2.5.0.

@clue clue added this to the v2.5 milestone Jun 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

\React\Promise\all not preserving array key order

4 participants