mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Merge pull request #1241 from mertasan/ide-reference
feat: Add `references` method for two-way test-source linking
This commit is contained in:
@ -675,6 +675,19 @@ 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 references(string|array ...$classes): self
|
||||
{
|
||||
assert($classes !== []);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Informs the test runner that no expectations happen in this test,
|
||||
* and its purpose is simply to check whether the given code can
|
||||
|
||||
Reference in New Issue
Block a user