DemodataRequestCreatedEvent example


class DemodataRequestCreatedEventTest extends TestCase
{
    public function testGetter(): void
    {
        $request = new DemodataRequest();
        $context = Context::createDefaultContext();
        $input = new ArrayInput([]);

        $event = new DemodataRequestCreatedEvent(
            $request,
            $context,
            $input
        );

        static::assertEquals($request$event->getRequest());
        static::assertEquals($context$event->getContext());
        static::assertEquals($input$event->getInput());
    }
}
$request->add(FlowDefinition::class$this->getCount($input, 'flows'));

        $request->add(
            CustomFieldSetDefinition::class,
            $this->getCount($input, 'attribute-sets'),
            $this->getCustomFieldOptions($input)
        );

        $request->add(MailTemplateDefinition::class$this->getCount($input, 'mail-template'));
        $request->add(MailHeaderFooterDefinition::class$this->getCount($input, 'mail-header-footer'));

        $this->eventDispatcher->dispatch(new DemodataRequestCreatedEvent($request$context$input));

        $demoContext = $this->demodataService->generate($request$context$io);

        $io->table(
            ['Entity', 'Items', 'Time'],
            $demoContext->getTimings()
        );

        return self::SUCCESS;
    }

    
Home | Imprint | This part of the site doesn't use cookies.