*/ private readonly array $calledMethods; /** * @psalm-param class-string $testClassName */ public function __construct(Telemetry\Info $telemetryInfo, string $testClassName, Code\ClassMethod ...$calledMethods) { $this->telemetryInfo = $telemetryInfo; $this->testClassName = $testClassName; $this->calledMethods = $calledMethods; } public function telemetryInfo(): Telemetry\Info { return $this->telemetryInfo; } /** * @psalm-return class-string */ public function testClassName(): string { return $this->testClassName; } /** * @psalm-return list */ public function calledMethods(): array { return $this->calledMethods; } public function asString(): string { $buffer = 'Before First Test Method Finished:'; foreach ($this->calledMethods as $calledMethod) { $buffer .= sprintf( PHP_EOL . '- %s::%s', $calledMethod->className(), $calledMethod->methodName(), ); } return $buffer; } }
*/ public function calledMethods(): array { return $this->calledMethods; } public function asString(): string { $buffer = 'Before First Test Method Finished:'; foreach ($this->calledMethods as $calledMethod) { $buffer .= sprintf( PHP_EOL . '- %s::%s', $calledMethod->className(), $calledMethod->methodName(), ); } return $buffer; } }