$this->
addTestConditions();
static::
assertGreaterThanOrEqual(1,
$this->
getIsNewCustomerConditions());
$this->migration->
update($this->connection
);
$this->migration->
update($this->connection
);
static::
assertCount(0,
$this->
getIsNewCustomerConditions());
static::
assertNull($this->
getTestRule()['payload'
], 'the migrated rule payload should be empty'
);
$value =
json_decode((string) $this->
getDaysSinceFirstLoginConditions()['value'
], true, 512, \JSON_THROW_ON_ERROR
);
static::
assertEquals('=',
$value['operator'
]);
static::
assertEquals(0,
$value['daysPassed'
]);
$this->
removeTestConditions();
} /**
* @return array<string, mixed>[]
*/
private function getIsNewCustomerConditions(): array
{ return $this->connection->
fetchAllAssociative('SELECT * FROM rule_condition WHERE type = "customerIsNewCustomer"'
);
} /**
* @return array<string|int, mixed>
*/