Jun 29 2021
@tstarling Question: in order to test what's in private property WatchedItemStore::stash after resetNotificationTimestamp execution we have to somehow access it and check what's in the bag.
There are several approaches to do it. The question is which one is favorable?
- Implement the getter - WatchedItemStore::getStash()
- Use magic method __get and return $this-> stash by unmanifest key (eg. prefixed with underscore, like _stash) so that private visibility is still making sense
- Utilize Reflection API and change WatchedItemStore::stash visibility only within a test
Or maybe you can suggest a better approach.