Repository: symfony/symfony
File: src/Symfony/Component/Config/Tests/Builder/GeneratedConfigTest.php (PHP)

Code before:
            'NodeInitialValues' => 'node_initial_values',
            'ArrayExtraKeys' => 'array_extra_keys',
            'ArrayValues' => 'array_values',
        ];

        foreach ($array as $name => $alias) {
            yield $name => [$name, $alias];
        }

        /*
         * Force load ContainerConfigurator to make env(), param() etc available
         * and also check if symfony/dependency-injection is installed
         */
        if (class_exists(ContainerConfigurator::class)) {
            yield 'Placeholders' => ['Placeholders', 'placeholders'];
        }
    }

    #[DataProvider('fixtureNames')]
    public function testConfig(string $name, string $alias)
    {
        $basePath = __DIR__.'/Fixtures/';
        $expectedOutput = include $basePath.$name.'.output.php';
        $expectedCode = $basePath.$name;

        if ($_SERVER['TEST_GENERATE_FIXTURES'] ?? false) {
            (new Filesystem())->remove($expectedCode);
            $this->generateConfigBuilder('Symfony\\Component\\Config\\Tests\\Builder\\Fixtures\\'.$name, $expectedCode);
            $this->markTestIncomplete('TEST_GENERATE_FIXTURES is set');
        }

        $this->generateConfigBuilder('Symfony\\Component\\Config\\Tests\\Builder\\Fixtures\\'.$name, $outputDir);

        $config = include $basePath.$name.'.config.php';

        $this->assertDirectorySame($expectedCode, $outputDir);

        $this->assertInstanceOf(ConfigBuilderInterface::class, $config);
        $this->assertSame($alias, $config->getExtensionAlias());
        $output = $config->toArray();
        if (class_exists(AbstractConfigurator::class)) {
            $output = AbstractConfigurator::processValue($output);
        }
        $this->assertSame($expectedOutput, $output);
    }

    #[DataProvider('fixtureNames')]
    #[IgnoreDeprecations]
    #[Group('legacy')]
    public function testLegacyConfig(string $name, string $alias)
    {

Review comment (suggestion):
for consistency (or getenv() everywhere?) :
```suggestion
        if ($_ENV['TEST_GENERATE_FIXTURES'] ?? false) {
```

Code after:
            'NodeInitialValues' => 'node_initial_values',
            'ArrayExtraKeys' => 'array_extra_keys',
            'ArrayValues' => 'array_values',
        ];

        foreach ($array as $name => $alias) {
            yield $name => [$name, $alias];
        }

        /*
         * Force load ContainerConfigurator to make env(), param() etc available
         * and also check if symfony/dependency-injection is installed
         */
        if (class_exists(ContainerConfigurator::class)) {
            yield 'Placeholders' => ['Placeholders', 'placeholders'];
        }
    }

    #[DataProvider('fixtureNames')]
    public function testConfig(string $name, string $alias)
    {
        $basePath = __DIR__.'/Fixtures/';
        $expectedOutput = include $basePath.$name.'.output.php';
        $expectedCode = $basePath.$name;

        if ($_ENV['TEST_GENERATE_FIXTURES'] ?? false) {
            (new Filesystem())->remove($expectedCode);
            $this->generateConfigBuilder('Symfony\\Component\\Config\\Tests\\Builder\\Fixtures\\'.$name, $expectedCode);
            $this->markTestIncomplete('TEST_GENERATE_FIXTURES is set');
        }

        $this->generateConfigBuilder('Symfony\\Component\\Config\\Tests\\Builder\\Fixtures\\'.$name, $outputDir);

        $config = include $basePath.$name.'.config.php';

        $this->assertDirectorySame($expectedCode, $outputDir);

        $this->assertInstanceOf(ConfigBuilderInterface::class, $config);
        $this->assertSame($alias, $config->getExtensionAlias());
        $output = $config->toArray();
        if (class_exists(AbstractConfigurator::class)) {
            $output = AbstractConfigurator::processValue($output);
        }
        $this->assertSame($expectedOutput, $output);
    }

    #[DataProvider('fixtureNames')]
    #[IgnoreDeprecations]
    #[Group('legacy')]
    public function testLegacyConfig(string $name, string $alias)
    {