You are here

public function CrudTest::testMappingCreation in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/rdf/tests/src/Kernel/CrudTest.php \Drupal\Tests\rdf\Kernel\CrudTest::testMappingCreation()

Tests creation of RDF mapping.

File

core/modules/rdf/tests/src/Kernel/CrudTest.php, line 45

Class

CrudTest
Tests the RDF mapping CRUD functions.

Namespace

Drupal\Tests\rdf\Kernel

Code

public function testMappingCreation() {
  $mapping_config_name = "{$this->prefix}.{$this->entityType}.{$this->bundle}";

  // Save bundle mapping config.
  rdf_get_mapping($this->entityType, $this->bundle)
    ->save();

  // Test that config file was saved.
  $mapping_config = \Drupal::configFactory()
    ->listAll('rdf.mapping.');
  $this
    ->assertContains($mapping_config_name, $mapping_config, 'Rdf mapping config saved.');
}