You are here

protected function WorkspaceTestUtilities::createNodeType in Workspace 8

Creates a new node type.

Parameters

string $label: The human-readable label of the type to create.

string $machine_name: The machine name of the type to create.

8 calls to WorkspaceTestUtilities::createNodeType()
EntityTypeAlterTest::testTree in tests/src/Functional/EntityTypeAlterTest.php
ReplicationSettingsPageTest::setUp in tests/src/Functional/ReplicationSettingsPageTest.php
ReplicationSettingsTest::testPullReplicationSettings in tests/src/Functional/ReplicationSettingsTest.php
Verify pull replication settings using the published filter as an example.
ReplicationSettingsTest::testPushReplicationSettings in tests/src/Functional/ReplicationSettingsTest.php
Verify push replication settings using the published filter as an example.
ReplicatorAliasTest::setUp in tests/src/Functional/ReplicatorAliasTest.php

... See full list

File

tests/src/Functional/WorkspaceTestUtilities.php, line 144

Class

WorkspaceTestUtilities
Utility methods for use in BrowserTestBase tests.

Namespace

Drupal\Tests\workspace\Functional

Code

protected function createNodeType($label, $machine_name) {
  $node_type = NodeType::create([
    'type' => $machine_name,
    'label' => $label,
  ]);
  $node_type
    ->save();
}