You are here

public function LayoutBuilderRestrictionsTestBase::generateTestNode in Layout Builder Restrictions 8.2

Content creation helper.

9 calls to LayoutBuilderRestrictionsTestBase::generateTestNode()
BlacklistedRestrictionsTest::testBlockRestriction in tests/src/FunctionalJavascript/BlacklistedRestrictionsTest.php
Verify that the UI can restrict blocks in Layout Builder settings tray.
BlockPlacementBlacklistTest::testBlockRestriction in modules/layout_builder_restrictions_by_region/tests/src/FunctionalJavascript/BlockPlacementBlacklistTest.php
Verify that the UI can restrict blocks in Layout Builder settings tray.
BlockPlacementWhitelistTest::testBlockRestriction in modules/layout_builder_restrictions_by_region/tests/src/FunctionalJavascript/BlockPlacementWhitelistTest.php
Verify that the UI can restrict blocks in Layout Builder settings tray.
DefaultRestrictionsTest::testNewCategoriesAllowed in tests/src/FunctionalJavascript/DefaultRestrictionsTest.php
When new categories are allowed, a newly available block is allowed.
DefaultRestrictionsTest::testNewCategoriesRestricted in tests/src/FunctionalJavascript/DefaultRestrictionsTest.php
When new categories are restricted, a newly available block is restricted.

... See full list

File

tests/src/FunctionalJavascript/LayoutBuilderRestrictionsTestBase.php, line 97

Class

LayoutBuilderRestrictionsTestBase
General-purpose methods for testing restrictions.

Namespace

Drupal\Tests\layout_builder_restrictions\FunctionalJavascript

Code

public function generateTestNode() {
  $editable_node = $this
    ->createNode([
    'uid' => 0,
    'type' => self::$testNodeBundle,
    'title' => 'The first node title',
    'body' => [
      [
        'value' => 'The first node body',
      ],
    ],
  ]);
  return $editable_node
    ->id();
}