fix: high order tests debug

This commit is contained in:
Nuno Maduro
2022-05-12 20:05:36 +01:00
parent 1461c9ba88
commit 4821bd4423

View File

@ -246,7 +246,7 @@ final class TestCall
*/ */
public function __get(string $name): self public function __get(string $name): self
{ {
return $this->addChain($name); return $this->addChain(Backtrace::file(), Backtrace::line(), $name);
} }
/** /**
@ -256,7 +256,7 @@ final class TestCall
*/ */
public function __call(string $name, array $arguments): self public function __call(string $name, array $arguments): self
{ {
return $this->addChain($name, $arguments); return $this->addChain(Backtrace::file(), Backtrace::line(), $name, $arguments);
} }
/** /**
@ -264,11 +264,11 @@ final class TestCall
* *
* @param array<int, mixed>|null $arguments * @param array<int, mixed>|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->testCaseMethod $this->testCaseMethod
->chains ->chains
->add(Backtrace::file(), Backtrace::line(), $name, $arguments); ->add($file, $line, $name, $arguments);
if ($this->descriptionLess) { if ($this->descriptionLess) {
$exporter = new Exporter(); $exporter = new Exporter();