$match =
$this->rule->
match($scope);
static::
assertFalse($match);
} /**
* @dataProvider getCaseTestMatchValues
*/
public function testMatch(OrderCreatedByAdminRule
$rule, OrderEntity
$order, bool
$isMatching): void
{ $scope =
$this->
createScope($order);
$match =
$rule->
match($scope);
static::
assertEquals($match,
$isMatching);
} public static function getCaseTestMatchValues(): \Generator
{ yield 'Condition is not created by admin => Not match because order created by admin' =>
[ new OrderCreatedByAdminRule(false
),
(new OrderEntity())->
assign(['createdById' => Uuid::
randomHex()]),
false,
];