The problem in T371460 happened because a data provider called ConvertibleTimestamp::setFakeTime( ... );, affecting data providers for other tests that called wfTimestamp( ... ) and expected to see the real current time.
We should disallow using setFakeTime() in PHPUnit data providers. See also T358451: Disallow access to globals and MediaWikiServices during the execution of PHPUnit data providers, which is the same idea, but for MediaWiki's various pieces of global state.