(string $class, string $method, string $expected)
| 35 | } |
| 36 | |
| 37 | function assertMethodVisibility(string $class, string $method, string $expected): void |
| 38 | { |
| 39 | $ref = new ReflectionMethod($class, $method); |
| 40 | $actual = $ref->isPublic() ? 'public' : ($ref->isProtected() ? 'protected' : 'private'); |
| 41 | check("$class::$method() is $expected", $actual === $expected); |
| 42 | } |
| 43 | |
| 44 | function assertMethodReturnType(string $class, string $method, string $expected): void |
| 45 | { |