I have recently started to write unit tests in my projects and I notice that all assert statements have a message argument.
What makes a good message for a unit test?
$cache->set('foo', 3);
$this->assertEquals($cache->get('foo'), 3, 'what should i say?');
Thanks!
State the fact under test.
Consider:
vs.:
A good unit test message should help you quickly guess where the bug is. A bad one makes you spend more time hunting.