getLineItemsInCartRuleConditions example

'id' => Uuid::randomBytes(),
            'rule_id' => $this->testRule['id'],
            'type' => 'cartLineItemsInCart',
            'value' => '{"operator":"=","identifiers":["001235290242435795391d026fa03b5b"]}',
            'created_at' => (new \DateTimeImmutable())->format('Y-m-d H:i:s'),
        ];
    }

    public function testUpdate(): void
    {
        $this->addTestConditions();
        static::assertGreaterThanOrEqual(1, $this->getLineItemsInCartRuleConditions());

        $this->migration->update($this->connection);
        static::assertCount(0, $this->getLineItemsInCartRuleConditions());
        static::assertNull($this->getTestRule()['payload'], 'the migrated rule payload should be empty');

        $this->removeTestConditions();
    }

    /** * @return array<string, mixed>[] */
    
Home | Imprint | This part of the site doesn't use cookies.