You are here

public function EntityCloneContentTest::testContentReferenceConfigEntity in Entity Clone 8

File

tests/src/Functional/EntityCloneContentTest.php, line 81

Class

EntityCloneContentTest
Create a content and test a clone.

Namespace

Drupal\Tests\entity_clone\Functional

Code

public function testContentReferenceConfigEntity() {
  $this
    ->createEntityReferenceField('node', 'page', 'config_field_reference', 'Config field reference', 'taxonomy_vocabulary');
  $node_title = $this
    ->randomMachineName(8);
  $node = Node::create([
    'type' => 'page',
    'title' => $node_title,
    'config_field_reference' => 'tags',
  ]);
  $node
    ->save();
  $this
    ->drupalGet('entity_clone/node/' . $node
    ->id());
  $this
    ->assertSession()
    ->elementNotExists('css', '#edit-recursive-nodepageconfig-field-reference');
}