fix: debug in high order tests

This commit is contained in:
Nuno Maduro
2022-05-12 20:03:11 +01:00
parent 298b1e6784
commit c1b32b9ffb

View File

@ -183,7 +183,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);
} }
/** /**
@ -193,7 +193,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);
} }
/** /**
@ -201,11 +201,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->testCaseFactory $this->testCaseFactory
->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();