'id' => Uuid::
randomBytes(),
'rule_id' =>
$this->testRule
['id'
],
'type' => 'customerIsNewCustomer',
'value' => '{"isNew":true}',
'created_at'
=> (new \
DateTimeImmutable())->
format('Y-m-d H:i:s'
),
];
} public function testUpdate(): void
{ $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();
}