Same name and namespace in other branches
  1. 8.x-1.x tests/src/Functional/EntityCloneContentTest.php \Drupal\Tests\entity_clone\Functional\EntityCloneContentTest::testContentReferenceConfigEntity() 1 comment

Test content reference config entity.

File

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

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