NodeTestBase.php

Definition of Drupal\node\Tests\NodeTestBase.

Namespace

Drupal\node\Tests

File

drupal/core/modules/node/lib/Drupal/node/Tests/NodeTestBase.php
View source
<?php

/**
 * @file
 * Definition of Drupal\node\Tests\NodeTestBase.
 */
namespace Drupal\node\Tests;

use Drupal\simpletest\WebTestBase;

/**
 * Sets up page and article content types.
 */
abstract class NodeTestBase extends WebTestBase {

  /**
   * Modules to enable.
   *
   * @var array
   */
  public static $modules = array(
    'node',
  );
  function setUp() {
    parent::setUp();

    // Create Basic page and Article node types.
    if ($this->profile != 'standard') {
      $this
        ->drupalCreateContentType(array(
        'type' => 'page',
        'name' => 'Basic page',
      ));
      $this
        ->drupalCreateContentType(array(
        'type' => 'article',
        'name' => 'Article',
      ));
    }
  }

}

Classes

Namesort descending Description
NodeTestBase Sets up page and article content types.