diff --git a/phpunit.xml b/phpunit.xml index 03fcbf718f..b083450096 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -4,8 +4,10 @@ bootstrap="tests/bootstrap.php" cacheResult="false" colors="true" + executionOrder="random" failOnRisky="true" failOnWarning="true" + failOnEmptyTestSuite="true" beStrictAboutChangesToGlobalState="true" beStrictAboutCoversAnnotation="true" beStrictAboutOutputDuringTests="true" diff --git a/tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php b/tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php index 5232f164ff..5863760fef 100644 --- a/tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php +++ b/tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php @@ -24,6 +24,7 @@ protected function setUp(): void protected function tearDown(): void { putenv('COLUMNS'); + putenv('TERM_PROGRAM'); } public function dataFormatterOutputProvider(): iterable @@ -195,6 +196,7 @@ public function testFormatErrors( } $formatter = $this->createErrorFormatter(null); + // NOTE: extra env vars need to be cleared in tearDown() foreach ($extraEnvVars as $envVar) { putenv($envVar); }