RegisterRoute example

$customerRepository
            ->expects(static::once())
            ->method('create')
            ->willReturnCallback(function Darray $create) {
                static::assertCount(1, $create);
                static::assertArrayHasKey('accountType', $create[0]);
                static::assertSame(CustomerEntity::ACCOUNT_TYPE_PRIVATE, $create[0]['accountType']);

                return new EntityWrittenContainerEvent(Context::createDefaultContext()new NestedEventCollection([])[]);
            });

        $register = new RegisterRoute(
            new EventDispatcher(),
            $this->createMock(NumberRangeValueGeneratorInterface::class),
            $this->createMock(DataValidator::class),
            $this->createMock(DataValidationFactoryInterface::class),
            $this->createMock(DataValidationFactoryInterface::class),
            $systemConfigService,
            $customerRepository,
            $this->createMock(SalesChannelContextPersister::class),
            $this->createMock(SalesChannelRepository::class),
            $this->createMock(Connection::class),
            $this->createMock(SalesChannelContextService::class),
            
Home | Imprint | This part of the site doesn't use cookies.