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).

function TMGMTUiReviewTest::setUp

Overrides DrupalWebTestCase::setUp()

Overrides TMGMTTestBase::setUp

File

tests/src/Functional/TMGMTUiReviewTest.php, line 26

Class

TMGMTUiReviewTest
Verifies the UI of the review form.

Namespace

Drupal\Tests\tmgmt\Functional

Code

function setUp() : void {
  parent::setUp();
  $this
    ->addLanguage('de');
  $filtered_html_format = FilterFormat::create(array(
    'format' => 'filtered_html',
    'name' => 'Filtered HTML',
  ));
  $filtered_html_format
    ->save();
  $this
    ->drupalCreateContentType(array(
    'type' => 'test_bundle',
  ));
  $this
    ->loginAsAdmin(array(
    'create translation jobs',
    'submit translation jobs',
    'create test_bundle content',
    $filtered_html_format
      ->getPermissionName(),
  ));
  \Drupal::service('file_system')
    ->copy(DRUPAL_ROOT . '/core/misc/druplicon.png', 'public://example.jpg');
  $this->image = File::create(array(
    'uri' => 'public://example.jpg',
  ));
  $this->image
    ->save();
}