Allows to set context on todos

This commit is contained in:
Nuno Maduro
2024-08-03 18:42:31 +01:00
parent 41e50cac05
commit 651aab560c
6 changed files with 62 additions and 9 deletions

View File

@ -355,12 +355,32 @@ final class TestCall
/**
* Sets the test as "todo".
*/
public function todo(): self
{
public function todo(
array|string $issue = null,
array|string $pr = null,
array|string $assignee = null,
array|string $note = null,
): self {
$this->skip('__TODO__');
$this->testCaseMethod->todo = true;
if ($issue !== null) {
$this->issue($issue);
}
if ($pr !== null) {
$this->pr($pr);
}
if ($assignee !== null) {
$this->assignee($assignee);
}
if ($note !== null) {
$this->note($note);
}
return $this;
}