<?php debug_backtrace(int $options = DEBUG_BACKTRACE_PROVIDE_OBJECT, int $limit = 0): array
<?php static function findTestClassAndMethodThatCalledThis() { $traces = debug_backtrace(options: DEBUG_BACKTRACE_IGNORE_ARGS, limit: 10); foreach ($traces as $trace) { if (is_subclass_of($trace['class'], TestCase::class)) {