You are here

protected function SerializationTest::createPage in Page Manager 8.4

Same name and namespace in other branches
  1. 8 tests/src/Kernel/SerializationTest.php \Drupal\Tests\page_manager\Kernel\SerializationTest::createPage()

Create a basic page.

Return value

\Drupal\page_manager\Entity\Page

2 calls to SerializationTest::createPage()
SerializationTest::testPage in tests/src/Kernel/SerializationTest.php
Test serialization of a page.
SerializationTest::testPageVariant in tests/src/Kernel/SerializationTest.php
Test serialization of a variant.

File

tests/src/Kernel/SerializationTest.php, line 59

Class

SerializationTest
Tests the serialization of the entities we provide.

Namespace

Drupal\Tests\page_manager\Kernel

Code

protected function createPage() {
  return Page::create([
    'id' => $this
      ->randomMachineName(),
    'label' => $this
      ->randomString(),
    'description' => $this
      ->randomString(),
    'path' => 'admin/foo',
    'use_admin_theme' => TRUE,
  ]);
}