mirror of
https://github.com/pestphp/pest.git
synced 2026-12-05 07:15:33 +01:00
59c1cb78f8
* feat(tia): replay unaffected tests in a partial run * fix(tia): run a partial selection directly where a complete run is refused * fix(tia): leave a graph from another environment alone in a partial run
28 lines
901 B
PHP
28 lines
901 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Tests\Fixtures\Tia\Project;
|
|
|
|
afterEach(function (): void {
|
|
Project::destroyAll();
|
|
});
|
|
|
|
test('a partial run without a coverage driver names its selection, not the full suite', function (): void {
|
|
$project = Project::make('master');
|
|
$project->seed('master');
|
|
|
|
$project->write('app/Calculator.php', str_replace(
|
|
'return $a + $b;',
|
|
'return $b + $a;',
|
|
(string) file_get_contents($project->path().'/app/Calculator.php'),
|
|
));
|
|
|
|
$result = $project->pestWithEnvironment($project->path(), ['XDEBUG_MODE' => 'off'], '--tia', 'tests/Unit');
|
|
|
|
expect($result->exitCode)->toBe(0, $result->describe())
|
|
->and($result->output)->toContain('no coverage driver is available')
|
|
->and($result->tally())->toContain('4 passed')
|
|
->and($result->output)->not->toContain('Running the full suite');
|
|
})->skipOnWindows();
|