Base class for tests.
Expanded class hierarchy of TMGMTTestBase
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');
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TMGMTTestBase:: |
protected | property | ||
TMGMTTestBase:: |
protected | property | A default translator using the test translator. | |
TMGMTTestBase:: |
protected static | property | Modules to enable. | 14 |
TMGMTTestBase:: |
function | Overrides DrupalWebTestCase::setUp() | 16 | |
TmgmtTestTrait:: |
protected | property | List of permissions used by loginAsAdmin(). | |
TmgmtTestTrait:: |
protected | property | Drupal user object created by loginAsAdmin(). | |
TmgmtTestTrait:: |
protected | property | The language weight for new languages. | |
TmgmtTestTrait:: |
protected | property | List of permissions used by loginAsTranslator(). | |
TmgmtTestTrait:: |
protected | property | Drupal user object created by loginAsTranslator(). | |
TmgmtTestTrait:: |
function | Sets the proper environment. | ||
TmgmtTestTrait:: |
function | Asserts job item language codes. | ||
TmgmtTestTrait:: |
protected | function | Asserts text in the page with an xpath expression. | |
TmgmtTestTrait:: |
function | Clicks on an image link with the provided title attribute. | ||
TmgmtTestTrait:: |
function | Creates, saves and returns a translation job. | ||
TmgmtTestTrait:: |
function | Creates, saves and returns a translator. | ||
TmgmtTestTrait:: |
function | Will create a user with admin permissions and log it in. | ||
TmgmtTestTrait:: |
function | Will create a user with translator permissions and log it in. |