wiki.techinc.nl/tests/phpunit/mocks/GhostFieldTestClass.php
Umherirrender b81db269a6 tests: Allow dynamic properties on PHP 8.2 for GhostFieldTestClass
Deprecated: Creation of dynamic property
Wikimedia\Reflection\GhostFieldTestClass::$privateField is deprecated in
/workspace/src/tests/phpunit/includes/libs/serialization/SerializationTestUtils.php
on line 150

Bug: T314099
Change-Id: Ic1cd7a3560e6fe39e6c7b077f42c90fbc844c202
2023-01-06 03:06:06 +01:00

26 lines
692 B
PHP

<?php
namespace Wikimedia\Reflection;
/**
* This class used to contain a $privateField, $protectedField and $publicField.
* This is used to test that unserialized instances still have the values of
* these ghost fields and the values can be accessed with GhostFieldAccessTrait.
* @package Wikimedia\Reflection
*/
#[\AllowDynamicProperties]
class GhostFieldTestClass {
use GhostFieldAccessTrait;
public function getPrivateField() {
return $this->getGhostFieldValue( 'privateField' );
}
public function getProtectedField() {
return $this->getGhostFieldValue( 'protectedField' );
}
public function getPublicField() {
return $this->getGhostFieldValue( 'publicField' );
}
}