- 🇬🇧United Kingdom joachim
Now that #3224276: Move useful helper methods for working with entities from EntityKernelTestBase to a trait → is in, this method can go on Drupal\Tests\EntityTrait.
- Status changed to Needs review
3 months ago 8:51am 21 August 2024 - Merge request !9275Added method to assert that an entity passes validation. → (Open) created by joachim
- Status changed to RTBC
3 months ago 12:57pm 21 August 2024 - 🇺🇸United States smustgrave
Seems pretty straightforward and do believe useful.
Going to mark but only comment would be around the comment
Asserts that an entity passes entity validation.
should it beAsserts that an entity passes validation.
But don't think worth holding up.
- 🇬🇧United Kingdom joachim
I wrote that initially, but then I thought it's not clear -- *what* kind of validation specifically?
Thanks for reviewing!
- 🇬🇧United Kingdom catch
There are existing validation checks in tests that could be converted to use this. It doesn't necessarily have to be all of them here, but:
1. We should convert at least one in this issue, otherwise the new method is dead code.
2. If we don't convert all calls here, then that should happen in one follow-up.
- Status changed to Needs work
2 months ago 10:23pm 13 September 2024 - 🇬🇧United Kingdom joachim
Fixed the missing param name.
> 33 Access to an undefined property
> Drupal\Tests\field\Kernel\FieldCrudTest::$entityTypeManager.That predates this issue's changes. Also, isn't it normal for traits to reference properties they expect on the using class?
The Needs Review Queue Bot → tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇺🇸United States smustgrave
Possible to convert least 1 instance to use this new function
The Needs Review Queue Bot → tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide → to find step-by-step guides for working with issues.
- 🇬🇧United Kingdom joachim
33 Access to an undefined property Drupal\Tests\field\Kernel\FieldCrudTest::$entityTypeManager.
Not sure how to deal with this, as it predates this MR.