You are here

NodeTestBase.php in Freelinking 4.0.x

Same filename and directory in other branches
  1. 8.3 tests/src/Unit/Plugin/freelinking/NodeTestBase.php

File

tests/src/Unit/Plugin/freelinking/NodeTestBase.php
View source
<?php

namespace Drupal\Tests\freelinking\Unit\Plugin\freelinking;

use Drupal\Core\Language\Language;
use Drupal\Tests\UnitTestCase;
use Prophecy\PhpUnit\ProphecyTrait;

/**
 * Provides helper methods for freelinking node plugins.
 */
abstract class NodeTestBase extends UnitTestCase {
  use ProphecyTrait;

  /**
   * Get a language object to pass into the plugin.
   *
   * @return \Drupal\Core\Language\LanguageInterface
   *   Return language object with default values.
   */
  public static function getDefaultLanguage() {
    return new Language(Language::$defaultValues);
  }

}

Classes

Namesort descending Description
NodeTestBase Provides helper methods for freelinking node plugins.