You are here

private function OptimizelyIncludeSnippetTest::makePage in Optimizely 8.0

Same name and namespace in other branches
  1. 8.3 src/Tests/OptimizelyIncludeSnippetTest.php \Drupal\optimizely\Tests\OptimizelyIncludeSnippetTest::makePage()
  2. 8 src/Tests/OptimizelyIncludeSnippetTest.php \Drupal\optimizely\Tests\OptimizelyIncludeSnippetTest::makePage()
1 call to OptimizelyIncludeSnippetTest::makePage()
OptimizelyIncludeSnippetTest::testIncludeSnippet in src/Tests/OptimizelyIncludeSnippetTest.php

File

src/Tests/OptimizelyIncludeSnippetTest.php, line 110
Contains \Drupal\optimizely\Tests\OptimizelyIncludeSnippetTest

Class

OptimizelyIncludeSnippetTest
Tests that the javascript snippet is included on project pages and not included on non-project pages.

Namespace

Drupal\optimizely\Tests

Code

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