vscode-phpunit icon indicating copy to clipboard operation
vscode-phpunit copied to clipboard

Feature Request: Run single data-set entry.

Open sirpilan opened this issue 8 months ago • 1 comments

I'd like to run a test with a single data-set entry:

Example:

#[DataProvider('provideSomeTestData')]
public function testSomething(int $someInput): void
{
    $this->assertEquals(1, $someInput);
}

public function provideSomeTestData(): iterable {
    yield 'first' => [1]; # <- clickable icon to run only this one
    yield 'second' => [2]; # <- or this one
}

The Command executed is already prepared for this: phpunit --filter=^.*::(testSomething)(( with (data set )?.*)?)?$ [...]

This is the desired Command for this feature: phpunit --filter="^.*::(testSomething)(( with (data set \"second\").*)?)?$" [...]

Thx for your work!

sirpilan avatar Mar 31 '25 06:03 sirpilan