getPromotionDbRows example

$this->promotionDefinition,
            [
                'use_codes' => true,
                'use_individual_codes' => false,
                'code' => ' ',
            ],
            ['id' => 'D1'],
            $this->createMock(EntityExistence::class),
            '/0'
        );

        $fakeConnection = new FakeConnection($this->getPromotionDbRows());

        $event = new PreWriteValidationEvent($this->context, $commands);
        $validator = new PromotionValidator($fakeConnection);
        $validator->preValidate($event);

        try {
            $event->getExceptions()->tryToThrow();
            static::fail('Validation with invalid until was not triggered.');
        } catch (WriteException $e) {
            static::assertCount(1, $e->getExceptions());

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