function ConfigEntityTypeTest::testGetPropertiesToExportSchemaFallback

@covers ::getPropertiesToExport

@group legacy @expectedDeprecation Entity type "example_config_entity_type" is using config schema as a fallback for a missing `config_export` definition is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. See https://www.drupal.org/node/2949023.

File

core/tests/Drupal/Tests/Core/Config/Entity/ConfigEntityTypeTest.php, line 200

Class

ConfigEntityTypeTest
@coversDefaultClass <a href="/api/drupal/core%21lib%21Drupal%21Core%21Config%21Entity%21ConfigEntityType.php/class/ConfigEntityType/8.9.x" title="Provides an implementation of a configuration entity type and its metadata." class="local">\Drupal\Core\Config\Entity\ConfigEntityType</a> @group Config

Namespace

Drupal\Tests\Core\Config\Entity

Code

public function testGetPropertiesToExportSchemaFallback() {
    $this->typedConfigManager
        ->expects($this->once())
        ->method('getDefinition')
        ->will($this->returnValue([
        'mapping' => [
            'id' => '',
            'dependencies' => '',
        ],
    ]));
    $config_entity_type = new ConfigEntityType([
        'id' => 'example_config_entity_type',
    ]);
    $this->assertEquals([
        'id' => 'id',
        'dependencies' => 'dependencies',
    ], $config_entity_type->getPropertiesToExport('test'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.