protected static function StorageCopyTraitTest::toArray in Drupal 9
Same name and namespace in other branches
- 8 core/tests/Drupal/Tests/Core/Config/StorageCopyTraitTest.php \Drupal\Tests\Core\Config\StorageCopyTraitTest::toArray()
Get the protected config data out of a MemoryStorage.
Parameters
\Drupal\Core\Config\MemoryStorage $storage: The config storage to extract the data from.
Return value
array
1 call to StorageCopyTraitTest::toArray()
- StorageCopyTraitTest::testReplaceStorageContents in core/
tests/ Drupal/ Tests/ Core/ Config/ StorageCopyTraitTest.php - @covers ::replaceStorageContents
File
- core/
tests/ Drupal/ Tests/ Core/ Config/ StorageCopyTraitTest.php, line 87
Class
- StorageCopyTraitTest
- @coversDefaultClass \Drupal\Core\Config\StorageCopyTrait @group Config
Namespace
Drupal\Tests\Core\ConfigCode
protected static function toArray(MemoryStorage $storage) {
$reflection = new \ReflectionObject($storage);
$property = $reflection
->getProperty('config');
$property
->setAccessible(TRUE);
return $property
->getValue($storage)
->getArrayCopy();
}