private DefinitionInstanceRegistry&MockObject
$definitionInstanceRegistry;
private ValidatorInterface&MockObject
$validator;
private CronIntervalFieldSerializer
$intervalFieldSerializer;
protected function setUp(): void
{ $this->definitionInstanceRegistry =
$this->
createMock(DefinitionInstanceRegistry::
class);
$this->validator =
$this->
createMock(ValidatorInterface::
class);
$this->intervalFieldSerializer =
new CronIntervalFieldSerializer( $this->validator,
$this->definitionInstanceRegistry
);
} public function testEncodeMethodWithCorrectDataWillReturnCronIntervalString(): void
{ $data =
new KeyValuePair('key',
new CronExpression(self::COMPLEX_CRON
), false
);
$cronExpression =
$this->intervalFieldSerializer->
encode( new CronIntervalField('fake', 'fake'
),