NodeTestBase.php

Same filename in this branch
  1. 8.9.x core/modules/node/src/Tests/NodeTestBase.php
  2. 8.9.x core/modules/node/tests/src/Functional/Views/NodeTestBase.php
  3. 8.9.x core/modules/node/tests/src/Functional/NodeTestBase.php
Same filename in other branches
  1. 9 core/modules/node/tests/src/Functional/Views/NodeTestBase.php
  2. 9 core/modules/node/tests/src/Functional/NodeTestBase.php
  3. 10 core/modules/node/tests/src/Functional/Views/NodeTestBase.php
  4. 10 core/modules/node/tests/src/Functional/NodeTestBase.php
  5. 11.x core/modules/node/tests/src/Functional/Views/NodeTestBase.php
  6. 11.x core/modules/node/tests/src/Functional/NodeTestBase.php

Namespace

Drupal\node\Tests\Views

File

core/modules/node/src/Tests/Views/NodeTestBase.php

View source
<?php

namespace Drupal\node\Tests\Views;

@trigger_error('\\Drupal\\node\\Tests\\Views\\NodeTestBase is deprecated in Drupal 8.4.0 and will be removed before Drupal 9.0.0. Instead, use \\Drupal\\Tests\\node\\Functional\\Views\\NodeTestBase', E_USER_DEPRECATED);
use Drupal\views\Tests\ViewTestBase;
use Drupal\views\Tests\ViewTestData;

/**
 * Base class for all node tests.
 *
 * @deprecated in drupal:8.?.? and is removed from drupal:9.0.0.
 *   Use \Drupal\Tests\node\Functional\Views\NodeTestBase instead.
 */
abstract class NodeTestBase extends ViewTestBase {
    
    /**
     * Modules to enable.
     *
     * @var array
     */
    public static $modules = [
        'node_test_views',
    ];
    protected function setUp($import_test_views = TRUE) {
        parent::setUp($import_test_views);
        if ($import_test_views) {
            ViewTestData::createTestViews(get_class($this), [
                'node_test_views',
            ]);
        }
    }

}

Classes

Title Deprecated Summary
NodeTestBase

in drupal:8.?.? and is removed from drupal:9.0.0. Use \Drupal\Tests\node\Functional\Views\NodeTestBase instead.

Base class for all node tests.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.