Error message

  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).
  • Warning: count(): Parameter must be an array or an object that implements Countable in _api_make_match_member_link() (line 1230 of /home/projects/api/www/sites/all/modules/api/api.formatting.inc).

abstract class TMGMTTestBase

Same name in this branch
  1. 8.x-1.x src/Tests/TMGMTTestBase.php \Drupal\tmgmt\Tests\TMGMTTestBase
  2. 8.x-1.x tests/src/Functional/TMGMTTestBase.php \Drupal\Tests\tmgmt\Functional\TMGMTTestBase

Base class for tests.

Hierarchy

Expanded class hierarchy of TMGMTTestBase

10 files declare their use of TMGMTTestBase

File

tests/src/Functional/TMGMTTestBase.php, line 11

Namespace

Drupal\Tests\tmgmt\Functional
View source
abstract class TMGMTTestBase extends BrowserTestBase {
  use TmgmtTestTrait;

  /**
   * A default translator using the test translator.
   *
   * @var Translator
   */
  protected $default_translator;

  /**
   * Modules to enable.
   *
   * @var array
   */
  protected static $modules = array(
    'tmgmt',
    'tmgmt_test',
    'node',
    'block',
    'locale',
  );

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'starterkit_theme';

  /**
   * Overrides DrupalWebTestCase::setUp()
   */
  function setUp() : void {
    parent::setUp();
    $this->default_translator = Translator::load('test_translator');
    $this
      ->drupalPlaceBlock('local_tasks_block');
    $this
      ->drupalPlaceBlock('local_actions_block');
    $this
      ->drupalPlaceBlock('page_title_block');
  }

}

Members

Namesort descending Modifiers Type Description Overrides
TMGMTTestBase::$defaultTheme protected property
TMGMTTestBase::$default_translator protected property A default translator using the test translator.
TMGMTTestBase::$modules protected static property Modules to enable. 14
TMGMTTestBase::setUp function Overrides DrupalWebTestCase::setUp() 16
TmgmtTestTrait::$admin_permissions protected property List of permissions used by loginAsAdmin().
TmgmtTestTrait::$admin_user protected property Drupal user object created by loginAsAdmin().
TmgmtTestTrait::$languageWeight protected property The language weight for new languages.
TmgmtTestTrait::$translator_permissions protected property List of permissions used by loginAsTranslator().
TmgmtTestTrait::$translator_user protected property Drupal user object created by loginAsTranslator().
TmgmtTestTrait::addLanguage function Sets the proper environment.
TmgmtTestTrait::assertJobItemLangCodes function Asserts job item language codes.
TmgmtTestTrait::assertTextByXpath protected function Asserts text in the page with an xpath expression.
TmgmtTestTrait::clickLinkWithImageTitle function Clicks on an image link with the provided title attribute.
TmgmtTestTrait::createJob function Creates, saves and returns a translation job.
TmgmtTestTrait::createTranslator function Creates, saves and returns a translator.
TmgmtTestTrait::loginAsAdmin function Will create a user with admin permissions and log it in.
TmgmtTestTrait::loginAsTranslator function Will create a user with translator permissions and log it in.