in src/Framework/HackTest.hack [249:263]
private function validateTestMethods(): void {
foreach ($this->methods as $method) {
$method_name = $method->getName();
if (!$method->isPublic()) {
throw new InvalidTestMethodException(
Str\format('Test method (%s) must be public', $method_name),
);
}
if (!static::ALLOW_STATIC_TEST_METHODS && $method->isStatic()) {
throw new InvalidTestMethodException(
Str\format('Test method (%s) cannot be static', $method_name),
);
}
}
}