private OrderStorer
$storer;
private MockObject&EntityRepository
$repository;
private MockObject&EventDispatcherInterface
$dispatcher;
protected function setUp(): void
{ $this->repository =
$this->
createMock(EntityRepository::
class);
$this->dispatcher =
$this->
createMock(EventDispatcherInterface::
class);
$this->storer =
new OrderStorer($this->repository,
$this->dispatcher
);
} public function testStoreWithAware(): void
{ $event =
$this->
createMock(CheckoutOrderPlacedEvent::
class);
$stored =
[];
$stored =
$this->storer->
store($event,
$stored);
static::
assertArrayHasKey(OrderAware::ORDER_ID,
$stored);
} public function testStoreWithNotAware(): void
{