.../Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php index ed082d8..d426390 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityCacheTagsTestBase.php @@ -97,7 +97,7 @@ public function setUp() { } /** - * Generates the standardized test info. + * Generates standardized entity cache tags test info. * * @param string $entity_type_label * The label of the entity type whose cache tags to test. @@ -119,6 +119,10 @@ protected static function generateStandardizedInfo($entity_type_label, $group) { /** * Creates the entity to be tested. * + * This is a static method to guarantee that subclasses that implement it + * don't set additional properties on the object: it ensures a clear, strict + * contract. + * * @return \Drupal\Core\Entity\EntityInterface * The entity to be tested. */ @@ -134,6 +138,10 @@ protected static function createEntity() { /** * Creates a referencing and a non-referencing entity for testing purposes. * + * This is a static method to guarantee that subclasses that override it + * don't set additional properties on the object: it ensures a clear, strict + * contract. + * * @param \Drupal\Core\Entity\EntityInterface $referenced_entity * The entity that the referencing entity should reference. *