protected function FpmTestBase::updateProperty in Feeds Paragraphs 8
Updates a protected, private property of an object.
Parameters
string $class:
mixed $object:
string $property:
mixed $value:
3 calls to FpmTestBase::updateProperty()
- TestImporter::initImporter in tests/
src/ Unit/ TestImporter.php - TestImporter::testShouldCreateNew in tests/
src/ Unit/ TestImporter.php - @covers ::shouldCreateNew
- TestRevisionHandler::testCleanUp in tests/
src/ Unit/ TestRevisionHandler.php - @covers ::cleanUp
File
- tests/
src/ Unit/ FpmTestBase.php, line 311
Class
Namespace
Drupal\Tests\feeds_para_mapper\UnitCode
protected function updateProperty($class, &$object, $property, $value) {
try {
$ref = new \ReflectionClass($class);
$prop = $ref
->getProperty($property);
$prop
->setAccessible(true);
$prop
->setValue($object, $value);
} catch (\ReflectionException $e) {
}
}