Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cconard96 committed Dec 7, 2024
1 parent a77d97c commit 8067cc5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions phpunit/functional/Glpi/Asset/CustomFieldDefinitionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,12 @@ public static function validateValueProvider()
'expected_value' => 'test',
'is_valid' => false,
],
[
'field_params' => ['type' => DateType::class],
'given_value' => '',
'expected_value' => null,
'is_valid' => true,
],
[
'field_params' => ['type' => DateTimeType::class],
'given_value' => '2021-01-01 00:00:00',
Expand All @@ -247,6 +253,12 @@ public static function validateValueProvider()
'expected_value' => 'test',
'is_valid' => false,
],
[
'field_params' => ['type' => DateTimeType::class],
'given_value' => '',
'expected_value' => null,
'is_valid' => true,
],
];
}

Expand Down

0 comments on commit 8067cc5

Please sign in to comment.