We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ReflectionProperty::setAccessible()
1 parent 941cc8b commit 78b010bCopy full SHA for 78b010b
1 file changed
tests/phpunit/tests/ai-client/wpAiClientPrompt.php
@@ -43,7 +43,9 @@ public function test_returns_error_builder_when_ai_not_supported() {
43
// Check the $error prop is a real WP_Error with the expected message.
44
$reflection = new ReflectionClass( $builder );
45
$error_prop = $reflection->getProperty( 'error' );
46
- $error_prop->setAccessible( true );
+ if ( PHP_VERSION_ID < 80100 ) {
47
+ $error_prop->setAccessible( true );
48
+ }
49
$error = $error_prop->getValue( $builder );
50
51
$this->assertInstanceOf( WP_Error::class, $error );
0 commit comments