protected function SerializationTest::createPage in Page Manager 8
Same name and namespace in other branches
- 8.4 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 64 - Contains \Drupal\Tests\page_manager\Kernel\SerializationTest.
Class
- SerializationTest
- Tests the serialization of the entities we provide.
Namespace
Drupal\Tests\page_manager\KernelCode
protected function createPage() {
return Page::create([
'id' => $this
->randomMachineName(),
'label' => $this
->randomString(),
'description' => $this
->randomString(),
'path' => 'admin/foo',
'use_admin_theme' => TRUE,
]);
}