public function test_extensions_execution_order()
{
$command = new CreateCart((string) CartId::generate(), 'PLN');
$executionOrder = [];
$prePromise = function () use(&$executionOrder) {
$executionOrder[] = spl_object_hash($this);
};
$extension1 = $this->createExtensionProphecy($command, $prePromise);
$extension2 = $this->createExtensionProphecy($command, $prePromise);
$this->extensionRegistry->register($extension1->reveal(), 0);
$this->extensionRegistry->register($extension2->reveal(), 1);
$this->extensionRegistry->pre($command);
$this->assertEquals([spl_object_hash($extension2), spl_object_hash($extension1)], $executionOrder);
}