wiki.techinc.nl/tests/phpunit/includes/session
Timo Tijhof 128debb64b tests: Change use of AtEase to at operator
Follows-up I361fde0de7f4406bce6ed075ed397effa5be3359.

Per T253461, not mass-changing source code, but the use of the native
error silencing operator (@) is especially useful in tests because:

1. It requires any/all statements to be explicitly marked. The
   suppressWarnings/restoreWarnings sections encourage developers to
   be "lazy" and thus encapsulate more than needed if there are multiple
   ones near each other, which would ignore potentially important
   warnings in a test case, which is generally exactly the time when
   it is really useful to get warnings etc.

2. It avoids leaking state, for example in LBFactoryTest the
   assertFalse call would throw a PHPUnit assertion error (not meant
   to be caught by the local catch), and thus won't reach
   AtEase::restoreWarnings. This then causes later code to end up
   in a mismatching state and creates a confusing error_reporting
   state.

See .phpcs.xml, where the at operator is allowed for all test code.

Change-Id: I68d1725d685e0a7586468bc9de6dc29ceea31b8a
2022-02-24 21:29:51 +00:00
..
BotPasswordSessionProviderTest.php phpunit: use ->getServiceContainer() in integration tests 2022-01-27 22:04:16 +01:00
CookieSessionProviderTest.php phpunit: use ->getServiceContainer() in integration tests 2022-01-27 22:04:16 +01:00
CsrfTokenSetTest.php Move CRSF token generation to CsrfTokenSet 2021-06-18 12:24:19 -07:00
ImmutableSessionProviderWithCookieTest.php Remove or replace usages of "sanity" 2021-11-21 19:35:49 +00:00
PHPSessionHandlerTest.php tests: Change use of AtEase to at operator 2022-02-24 21:29:51 +00:00
SessionBackendTest.php tests: Change use of AtEase to at operator 2022-02-24 21:29:51 +00:00
SessionInfoTest.php Create SessionProviderTestTrait to facilitate testing of an SessionProvider 2021-05-26 20:45:05 +03:00
SessionManagerTest.php Remove or replace usages of "sanity" 2021-11-21 19:35:49 +00:00
SessionProviderTest.php phpunit: use ->getServiceContainer() in integration tests 2022-01-27 22:04:16 +01:00
SessionTest.php tests: Change use of AtEase to at operator 2022-02-24 21:29:51 +00:00
TestBagOStuff.php objectcache: make BagOStuff key encoding more consistent 2020-12-02 20:20:42 -08:00
TestUtils.php Tests: Mark more more closures as static 2021-02-09 02:55:57 +00:00
UserInfoTest.php Remove or replace usages of "sanity" 2021-11-21 19:35:49 +00:00