I usually keep them pretty and short - just what is being tested. The message should not explain the history of all things that could go wrong, just need to point the reader in the right starting direction. The test should be clear enough so that he can understand it.
Usually I write my posts in such a way that someone who is not familiar with the test will have at least a little context, and someone who knows the test better probably knows exactly what went wrong (or at least least where something went wrong in the test).
In the above example, I would say something like "cache for" foo ", so the message will return as" cache for "foo", expected 3, but it was 67. "For someone familiar with the test, this will be much more useful than "expected 3", but there were 67 on line 123 of the abc test. "
(I am primarily a Java developer, so I say as if it were JUnit, I assume that phpunit or whatever it is called works approximately the same).
source share