Skip to content

Commit

Permalink
#12 expand test to cover random variation building
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhoelzel committed Mar 20, 2024
1 parent 4958eb8 commit cb552a7
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions tests/Unit/Component/ComponentItemFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,35 @@ public static function getValidComponents(): iterable
],
],
];

yield 'Component without variations' => [
[
'name' => 'Component1',
'title' => 'Component',
'description' => 'Test component',
'category' => 'TestCategory',
'sub_category' => 'SubCategory',
'parameters' => [
'one' => 'String',
'two' => 'float',
'three' => 'integer',
'four' => 'int',
'five' => 'double',
'six' => 'bool',
'seven' => 'boolean',
'eight' => 'SomeOtherType',
],
],
];

yield 'Component without parameters and variations' => [
[
'name' => 'Component1',
'title' => 'Component',
'description' => 'Test component',
'category' => 'TestCategory',
],
];
}

private function getComponentCategoryMock(string $category, ?string $subCategory = null): ComponentCategory
Expand Down

0 comments on commit cb552a7

Please sign in to comment.