As part of writing a change record for #2154251: Flag status incorrect when flagging another flag as a reaction to unflagging (Javascript), we should expand our tests so we know (!!!) and can verify what data hook implementations get from API functions.
I reckon the API functions we should cover are:s flag_get_entity_flags(), flag_get_counts(), flag_get_flag_counts(), flag_get_user_flag_counts().
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2208671.flag_.expand-hook-tests-check-api.patch | 41.44 KB | joachim |
Comments
Comment #1
joachim commentedWorking on this.
What I love about writing tests is how you find bugs:
#2208677: @return docs for flag_get_counts() are totally wrong
#2208759: document that flag_get_user_flag_counts() doesn't work for global flags
#2208847: flag_get_FOO_counts() API functions do not have their static caches reset when (un)flagging
Comment #2
joachim commented