You are here

function CrudTest::testMappingCreation in Zircon Profile 8

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

Tests creation of RDF mapping.

File

core/modules/rdf/src/Tests/CrudTest.php, line 50
Contains \Drupal\rdf\Tests\CrudTest.

Class

CrudTest
Tests the RDF mapping CRUD functions.

Namespace

Drupal\rdf\Tests

Code

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
    ->assertTrue(in_array($mapping_config_name, $mapping_config), 'Rdf mapping config saved.');
}