Minimal test case:
<?php /** * @group Database */ class DatabaseResetTest extends MediaWikiIntegrationTestCase { public function testOne() { $result = $this->editPage( 'Test', 'x' ); $this->assertTrue( $result->isOK() ); $this->assertTrue( $result->getValue()['new'], 'Not new!' ); } public function testTwo() { $result = $this->editPage( 'Test', 'x' ); $this->assertTrue( $result->isOK() ); $this->assertTrue( $result->getValue()['new'], 'Not new!' ); } }
Running the test in Vagrant yields
$ PHPUNIT_WIKI=wiki /vagrant/mediawiki/tests/phpunit/phpunit.php DatabaseResetTest.php Using PHP 7.2.31-1+0~20200514.41+debian9~1.gbpe2a56b+wmf1 PHPUnit 8.5.19 by Sebastian Bergmann and contributors. ... 1) DatabaseResetTest::testTwo Not new! Failed asserting that false is true.