static::
assertEquals(new NotNull(),
$isActiveConstraint[0
]);
static::
assertEquals(new Type('bool'
),
$isActiveConstraint[1
]);
} public function testReturnsFalseWhenProvidingIncorrectScope(): void
{ $salesChannelContext =
$this->
createMock(SalesChannelContext::
class);
$lineItem =
new LineItem('random-id', 'line-item'
);
$isActiveCustomerRule =
new IsActiveRule(true
);
$scope =
new LineItemScope($lineItem,
$salesChannelContext);
static::
assertFalse($isActiveCustomerRule->
match($scope));
} /**
* @return \Traversable<list<mixed>>
*/
public static function getCustomerScopeTestData(): \Traversable
{ yield 'match / operator yes / active customer' =>
[true, true, true, false
];
yield 'match / operator no / deactivated customer' =>
[false, false, true, false
];