Problem/Motivation
Follow up to #2926483: Add API methods for determining whether an entity object is the latest (translation-affecting) revision. Currently it's tricky to reliably know how many times an entity was loaded from storage in a test environment.
Proposed resolution
Implement a test entity storage class for this, which can be used in tests. \Drupal\entity_test\EntityTestNoLoadStorage is already doing something similar, it's a test storage implementation which adds some utility during testing.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | 2933930-11.patch | 4.07 KB | sam152 |
| #6 | 2933930-6.patch | 4.07 KB | sam152 |
| #6 | 2933930-6_FAILING.patch | 4.84 KB | sam152 |
Comments
Comment #2
sam152 commentedApplies on top of the blocker. Leaving as "Active" until that gets in.
Comment #3
plachBlocker gone :)
Comment #6
sam152 commentedFixing patch files.
Comment #7
sam152 commentedComment #10
borisson_This makes a lot of sense, I like that this has an implementation in the test. This patch no longer applies.
Comment #11
sam152 commentedComment #12
sam152 commentedComment #14
joachim commentedNitpicks:
Should be a complete sentence.
Something like: "Returns the number of times entities were loaded from storage."
The number *of*
Also the wording of the docs in general don't make it clear whether this is counting:
- the number of loads of a particular entity
- the number of entities that are loaded, as in, if I make a single load call for entities A and B, that's a count of 2
- the number of times entities are requested from storage (which is what it actually is).