Skip to content

Commit 6f92311

Browse files
committed
feat: adicionar --testdox, --colors=always e suite Functional no phpunit runner
- PhpUnitRunner.php: adicionado --testdox e --colors=always nos argumentos padrão Saída do phpunit agora sempre exibe nomes legíveis dos testes e cores ANSI - PhpUnitConfigGeneratorTest.php: adicionado 'Functional' => 'tests/Functional' no setUp e assert correspondente em generateContainsTestSuiteNames Nota: ProjectDetector já detectava Functional automaticamente (linha 151) sem necessidade de alteração na lógica de detecção. Quality: cs-fixer ✓ phpstan ✓ psalm ✓ phpunit ✓
1 parent 27a808f commit 6f92311

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/Runner/PhpUnitRunner.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ protected function defaultArguments(): array
2929
return [
3030
'--configuration',
3131
$this->context->configPath('phpunit.xml.dist'),
32+
'--testdox',
33+
'--colors=always',
3234
];
3335
}
3436
}

tests/Unit/Configuration/PhpUnitConfigGeneratorTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ protected function setUp(): void
3131
sourceDirs: ['/project/src'],
3232
testDirs: ['/project/tests'],
3333
excludeDirs: [],
34-
testSuites: ['Unit' => 'tests/Unit', 'Integration' => 'tests/Integration'],
34+
testSuites: ['Unit' => 'tests/Unit', 'Integration' => 'tests/Integration', 'Functional' => 'tests/Functional'],
3535
coverageExclude: [],
3636
csFixerRules: [],
3737
rectorSets: [],
@@ -64,6 +64,7 @@ public function generateContainsTestSuiteNames(): void
6464
$output = $this->generator->generate($this->context);
6565
$this->assertStringContainsString('name="Unit"', $output);
6666
$this->assertStringContainsString('name="Integration"', $output);
67+
$this->assertStringContainsString('name="Functional"', $output);
6768
}
6869

6970
#[Test]

0 commit comments

Comments
 (0)