-
Notifications
You must be signed in to change notification settings - Fork 513
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
Conversation
src/Akeneo/Category/back/Infrastructure/Builder/TemplateBuilder.php
Outdated
Show resolved
Hide resolved
src/Akeneo/Category/back/Infrastructure/Builder/TemplateBuilder.php
Outdated
Show resolved
Hide resolved
src/Akeneo/Category/back/Infrastructure/Builder/TemplateBuilder.php
Outdated
Show resolved
Hide resolved
src/Akeneo/Category/back/tests/Specification/Infrastructure/Builder/TemplateBuilderSpec.php
Show resolved
Hide resolved
src/Akeneo/Category/back/Infrastructure/Builder/TemplateBuilder.php
Outdated
Show resolved
Hide resolved
CategoryId $categoryId | ||
) | ||
{ | ||
$searchingCategoryCode->__toString()->willReturn('category_code'); |
There was a problem hiding this comment.
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
$searchingCategoryCode->__toString()->willReturn('category_code'); | |
const $searchingCategoryCode = new Code('category_code'); |
There was a problem hiding this comment.
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
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)