-
Notifications
You must be signed in to change notification settings - Fork 32
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
EWPP-2646: Fix publication thumbnail translation render. #1174
Conversation
0606baf
to
256a679
Compare
*/ | ||
public function testPublicationThumbnailMediaTranslation(): void { | ||
// Make publication node and image media translatable. | ||
\Drupal::service('content_translation.manager')->setEnabled('node', 'oe_publication', TRUE); |
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.
The bundle is already translatable because this is done in the setUp()
method.
/** | ||
* Tests that the Publication thumbnail media renders the translated media. | ||
*/ | ||
public function testPublicationThumbnailMediaTranslation(): void { |
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.
Why can't we test this in the previous test method? The title field is set to be translatable in the setUp()
and then the translation of the node is being tested. We can just do all the configuration needed in the setUp()
and then provide a Thumbnail
for the publication node so we can test this scenario too.
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.
Because that method is over 400 lines. I don't like shovelling everything under one test case. Here we test a specific scenario and this scenario is separate for event as well.
No description provided.