You are here

protected function ConfigDevelSubscriberEntityTest::doAssert in Configuration development 8

Assert that the config import succeeded.

Parameters

array $writen_data: The config data as written.

array $exported_data: The config data exported.

Overrides ConfigDevelSubscriberTestBase::doAssert

File

tests/src/Kernel/ConfigDevelSubscriberEntityTest.php, line 25

Class

ConfigDevelSubscriberEntityTest
Tests the automated importer for config entities.

Namespace

Drupal\Tests\config_devel\Kernel

Code

protected function doAssert(array $data, array $exported_data) {
  $entity = \Drupal::entityTypeManager()
    ->getStorage('config_test')
    ->load('test');
  $this
    ->assertIdentical($data['label'], $entity
    ->get('label'));
  $this
    ->assertIdentical($exported_data['label'], $data['label']);
  $this
    ->assertIdentical($exported_data['id'], 'test');
  $this
    ->assertFalse(isset($exported_data['uuid']));
}