CiviUnitTestCase - Display more accurate debug note
authorTim Otten <totten@civicrm.org>
Fri, 16 Dec 2022 07:52:27 +0000 (23:52 -0800)
committerTim Otten <totten@civicrm.org>
Tue, 7 Mar 2023 08:35:29 +0000 (00:35 -0800)
commit0f591678ee86edf67f26965994acacc37bfda68c
tree04021ac60768b6effbad228b00cf2b5e77cdef3b
parent47b2bc71d0f0ad9976451abdf77d67bf8e89cfa6
CiviUnitTestCase - Display more accurate debug note

If you skimmed, you might say: It prints a console message when it resets
the DB.  That seems like useful information for someone who wants to
understand the overall behavior, so good.

The reality is different.  `setUpBeforeClass()` and `setUp()` both reset the
DB.  `setUpBeforeClass()` does it for every test-class, but it never says so.
`setUp()` does it for the first test-method (and then no others).

So when it showed the message "Installing database", it should have really said:

> I just installed the database a minute ago without telling you.
> Now I'm installing it a second time, and you should know that.
> In the future, I will install twenty more times, but you don't need to know that.

That's a silly thing to say. Better to say when it's happening for realz.
tests/phpunit/CiviTest/CiviUnitTestCase.php