Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRF-509 add service to generate template Model #18140

Merged
merged 2 commits into from
Oct 18, 2022
Merged

GRF-509 add service to generate template Model #18140

merged 2 commits into from
Oct 18, 2022

Conversation

amigaire
Copy link
Contributor

Service to generate a template based on a category tree's code.
The code and the label of the template are automatically generated, the label is only generated in english.

Description (for Contributor and Core Developer)

Definition Of Done (for Core Developer only)

  • Tests

CategoryId $categoryId
)
{
$searchingCategoryCode->__toString()->willReturn('category_code');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, it could be simpler to use directly the instance of the Code values object instead of using mocks. Moreover, all validation or business rules will be available

Suggested change
$searchingCategoryCode->__toString()->willReturn('category_code');
const $searchingCategoryCode = new Code('category_code');

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It simplified a lot the tests, thx

@amigaire amigaire merged commit 5a68f8d into GRF-289 Oct 18, 2022
@amigaire amigaire deleted the GRF-509 branch October 18, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants