You are here

private function OptimizelyAliasIncludeSnippetTest::makePage in Optimizely 8

Same name and namespace in other branches
  1. 8.3 src/Tests/OptimizelyAliasIncludeSnippetTest.php \Drupal\optimizely\Tests\OptimizelyAliasIncludeSnippetTest::makePage()
  2. 8.0 src/Tests/OptimizelyAliasIncludeSnippetTest.php \Drupal\optimizely\Tests\OptimizelyAliasIncludeSnippetTest::makePage()

Make a page with a random title.

1 call to OptimizelyAliasIncludeSnippetTest::makePage()
OptimizelyAliasIncludeSnippetTest::testIncludeSnippet in src/Tests/OptimizelyAliasIncludeSnippetTest.php
Test inclusion and non-inclusion of snippet.

File

src/Tests/OptimizelyAliasIncludeSnippetTest.php, line 121

Class

OptimizelyAliasIncludeSnippetTest
Tests pages that have aliases.

Namespace

Drupal\optimizely\Tests

Code

private function makePage() {
  $settings = [
    'type' => 'page',
    'title' => $this
      ->randomMachineName(32),
    'langcode' => LanguageInterface::LANGCODE_NOT_SPECIFIED,
    'body' => [
      [
        'value' => $this
          ->randomMachineName(64),
        'format' => filter_default_format(),
      ],
    ],
  ];
  $node = $this
    ->drupalCreateNode($settings);
  return $node;
}