diff --git a/src/PendingObjects/TestCall.php b/src/PendingObjects/TestCall.php index 3f0d1045..62a9ac70 100644 --- a/src/PendingObjects/TestCall.php +++ b/src/PendingObjects/TestCall.php @@ -183,7 +183,7 @@ final class TestCall */ public function __get(string $name): self { - return $this->addChain($name); + return $this->addChain(Backtrace::file(), Backtrace::line(), $name); } /** @@ -193,7 +193,7 @@ final class TestCall */ public function __call(string $name, array $arguments): self { - return $this->addChain($name, $arguments); + return $this->addChain(Backtrace::file(), Backtrace::line(), $name, $arguments); } /** @@ -201,11 +201,11 @@ final class TestCall * * @param array|null $arguments */ - private function addChain(string $name, array $arguments = null): self + private function addChain(string $file, int $line, string $name, array $arguments = null): self { $this->testCaseFactory ->chains - ->add(Backtrace::file(), Backtrace::line(), $name, $arguments); + ->add($file, $line, $name, $arguments); if ($this->descriptionLess) { $exporter = new Exporter();