feat: adds see

This commit is contained in:
Nuno Maduro
2025-07-22 23:06:43 +01:00
parent 9172721ce8
commit be9c95e3bc
6 changed files with 43 additions and 24 deletions

View File

@ -688,6 +688,17 @@ final class TestCall // @phpstan-ignore-line
return $this;
}
/**
* Adds one or more references to the tested method or class. This helps
* to link test cases to the source code for easier navigation.
*
* @param array<class-string|string>|class-string ...$classes
*/
public function see(string|array ...$classes): self
{
return $this->references(...$classes);
}
/**
* Informs the test runner that no expectations happen in this test,
* and its purpose is simply to check whether the given code can