private OrderService
$orderService;
protected function setUp(): void
{ $eventDispatcher =
$this->
createMock(EventDispatcherInterface::
class);
$this->cartService =
$this->
createMock(CartService::
class);
$this->paymentMethodRepository =
$this->
createMock(EntityRepository::
class);
$stateMachineRegistry =
$this->
createMock(StateMachineRegistry::
class);
$this->orderService =
new OrderService( new DataValidator(Validation::
createValidatorBuilder()->
getValidator()),
new OrderValidationFactory(),
$eventDispatcher,
$this->cartService,
$this->paymentMethodRepository,
$stateMachineRegistry );
} public function testCreateOrderWithDigitalGoodsNeedsRevocationConfirm(): void
{ $dataBag =
new DataBag();
$dataBag->
set('tos', true
);