diff --git a/src/PendingCalls/TestCall.php b/src/PendingCalls/TestCall.php index 1b02ed1e..1208b809 100644 --- a/src/PendingCalls/TestCall.php +++ b/src/PendingCalls/TestCall.php @@ -615,6 +615,19 @@ public function coversNothing(): self 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 ...$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