function CrudTest::testMappingCreation

Same name in other branches
  1. 8.9.x 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 49

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.');
}

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