public function testStoreWithAware(): void
{ $event =
$this->
createMock(CustomerRegisterEvent::
class);
$stored =
[];
$stored =
$this->storer->
store($event,
$stored);
static::
assertArrayHasKey(CustomerAware::CUSTOMER_ID,
$stored);
} public function testStoreWillCatchCustomerDeleteException(): void
{ $event =
$this->
createMock(OrderStateMachineStateChangeEvent::
class);
$event->
method('getCustomerId'
)->
willThrowException(new CustomerDeletedException('id'
));
$stored =
[];
$stored =
$this->storer->
store($event,
$stored);
static::
assertArrayNotHasKey(CustomerAware::CUSTOMER_ID,
$stored);
} public function testStoreWithNotAware(): void
{ $event =
$this->
createMock(UserRecoveryRequestEvent::
class);
$stored =
[];
$stored =
$this->storer->
store($event,
$stored);