createLineItemWithIsNewMarker example

static::assertEquals($boolType$ruleConstraints['isNew'][0]);
    }

    /** * @dataProvider getLineItemScopeTestData */
    public function testIfMatchesCorrectWithLineItem(bool $ruleActive, bool $isNew, bool $expected): void
    {
        $this->rule->assign(['isNew' => $ruleActive]);

        $match = $this->rule->match(new LineItemScope(
            $this->createLineItemWithIsNewMarker($isNew),
            $this->createMock(SalesChannelContext::class)
        ));

        static::assertSame($expected$match);
    }

    /** * @return array<string, array<bool>> */
    public static function getLineItemScopeTestData(): array
    {
        
Home | Imprint | This part of the site doesn't use cookies.