Skip to content

Commit b8e8ddf

Browse files
phpstan-botclaude
andcommitted
Call parent::setUp() in subclasses overriding setUp()
PHPStanTestCase now defines setUp(), so subclasses that override it must call parent::setUp() to run the (opt-in) container re-registration. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 4f03332 commit b8e8ddf

7 files changed

Lines changed: 7 additions & 0 deletions

File tree

tests/PHPStan/Analyser/AnalyserTraitsIntegrationTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class AnalyserTraitsIntegrationTest extends PHPStanTestCase
2222
#[Override]
2323
protected function setUp(): void
2424
{
25+
parent::setUp();
2526
$this->fileHelper = self::getContainer()->getByType(FileHelper::class);
2627
}
2728

tests/PHPStan/Analyser/TypeSpecifierTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ class TypeSpecifierTest extends PHPStanTestCase
6161
#[Override]
6262
protected function setUp(): void
6363
{
64+
parent::setUp();
6465
$reflectionProvider = self::createReflectionProvider();
6566
$this->printer = new Printer();
6667
$this->typeSpecifier = self::getContainer()->getService('typeSpecifier');

tests/PHPStan/Command/ErrorFormatter/RawErrorFormatterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class RawErrorFormatterTest extends ErrorFormatterTestCase
1919
#[Override]
2020
protected function setUp(): void
2121
{
22+
parent::setUp();
2223
foreach (AgentDetector::ENV_VARS as $var) {
2324
$this->originalEnvVars[$var] = getenv($var);
2425
putenv($var);

tests/PHPStan/Command/ErrorFormatter/TableErrorFormatterTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class TableErrorFormatterTest extends ErrorFormatterTestCase
2323
#[Override]
2424
protected function setUp(): void
2525
{
26+
parent::setUp();
2627
putenv('GITHUB_ACTIONS');
2728

2829
$this->terminalEmulator = getenv('TERMINAL_EMULATOR');

tests/PHPStan/PhpDoc/DefaultStubFilesProviderTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ class DefaultStubFilesProviderTest extends PHPStanTestCase
1717
#[Override]
1818
protected function setUp(): void
1919
{
20+
parent::setUp();
2021
$this->currentWorkingDirectory = $this->getContainer()->getParameter('currentWorkingDirectory');
2122
}
2223

tests/PHPStan/Rules/Functions/PrintfHelperTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class PrintfHelperTest extends PHPStanTestCase
1515
#[Override]
1616
protected function setUp(): void
1717
{
18+
parent::setUp();
1819
$this->printf = new PrintfHelper(new PhpVersion(PHP_VERSION_ID));
1920
}
2021

tests/PHPStan/Type/Php/GmpOperatorTypeSpecifyingExtensionTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class GmpOperatorTypeSpecifyingExtensionTest extends PHPStanTestCase
2424
#[Override]
2525
protected function setUp(): void
2626
{
27+
parent::setUp();
2728
$this->extension = new GmpOperatorTypeSpecifyingExtension();
2829
}
2930

0 commit comments

Comments
 (0)