Same name in other branches
  1. 2.x tests/src/Functional/EntityCloneContentRecursiveCircularTest.php \Drupal\Tests\entity_clone\Functional\EntityCloneContentRecursiveCircularTest::setUp()

Sets the test up.

Fichier

tests/src/Functional/EntityCloneContentRecursiveCircularTest.php, line 62

Classe

EntityCloneContentRecursiveCircularTest
Create a content and test a clone.

Namespace

Drupal\Tests\entity_clone\Functional

Code

protected function setUp() : void {
    parent::setUp();
    $this->drupalCreateContentType([
        'type' => 'test_content_type',
        'name' => 'Test content type',
        'display_submitted' => FALSE,
    ]);
    $this->createEntityReferenceField('node', 'test_content_type', 'test_field_reference', 'Test field reference', 'node');
    $this->createEntityReferenceField('node', 'test_content_type', 'test_another_field_reference', 'Test another field reference', 'node');
    $this->adminUser = $this->drupalCreateUser($this->permissions);
    $this->drupalLogin($this->adminUser);
}