Improve unit tests by checking if session::setStatus sets errors
One approach is as in https://github.com/civicrm/civicrm-core/pull/19939 but it's not workable in practice because it generates too much extra visual noise on screen. However it pointed out some tests which could be improved. See also https://github.com/civicrm/civicrm-core/pull/19939#issuecomment-809683859 for some additional details. The last one here about financialtype I think I saw a variation of on-screen once and was just that the type of popup was wrong (i.e. using error instead of success).
not ok 599 - Error: CRM_Contact_Form_Task_EmailCommonTest::testPostProcessWithSignature not ok 603 - Error: CRM_Contact_Form_Task_UseraddTest::testUserCreateFail not ok 653 - Error: CRM_Contact_Page_View_UserDashBoardTest::testDashboardContentEmptyContact not ok 654 - Error: CRM_Contact_Page_View_UserDashBoardTest::testDashboardContentContributionsWithInvoicingEnabled not ok 655 - Error: CRM_Contact_Page_View_UserDashBoardTest::testDashboardContentContributions not ok 698 - Failure: CRM_Contribute_BAO_ContributionRecurTest::testAutoRenewalWhenOneMemberIsDeceased not ok 944 - Error: CRM_Core_BAO_AddressTest::testSharedAddressChaining3 not ok 1115 - Error: CRM_Core_BAO_SettingTest::testGetItemGroup_Override not ok 1116 - Error: CRM_Core_BAO_SettingTest::testDefaults not ok 1117 - Error: CRM_Core_BAO_SettingTest::testOnChange not ok 1118 - Error: CRM_Core_BAO_SettingTest::testSetCivicrmEnvironment not ok 1119 - Error: CRM_Core_BAO_SettingTest::testPseudoConstants not ok 507 - Error: api_v3_ContactTest::testMergedGetWithPermanentlyDeletedContact not ok 1382 - Failure: api_v3_JobTest::testProcessMembershipDeceased not ok 1418 - Failure: api_v3_LoggingTest::testEnableDisableLogging not ok 1522 - Failure: api_v3_MembershipStatusTest::testDeceasedMembershipInline not ok 280 - Error: Civi\Test\ExampleHookTest::testPageOutput fatal error - ext/oauth-client/tests/phpunit/CRM/OAuth/MailSetupTest.php:18 not ok 2 - Failure: Civi\Financialacls\FinancialTypeTest::testChangeFinancialTypeName