You are here

protected function LingotekTestBase::saveAsUnpublishedNodeForm in Lingotek Translation 8.2

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
  2. 3.0.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
  3. 3.1.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
  4. 3.2.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
  5. 3.3.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
  6. 3.4.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
  7. 3.5.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
  8. 3.6.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
  9. 3.7.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
  10. 3.8.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::saveAsUnpublishedNodeForm()
1 call to LingotekTestBase::saveAsUnpublishedNodeForm()
LingotekNodeTranslationDownloadStatusTest::createAndDownloadANodeTranslation in tests/src/Functional/LingotekNodeTranslationDownloadStatusTest.php
Helper method for creating and downloading a translation.

File

tests/src/Functional/LingotekTestBase.php, line 328

Class

LingotekTestBase
Base class for Lingotek test. Performs authorization of the account.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function saveAsUnpublishedNodeForm(array $edit, $bundle = 'article') {
  $path = $bundle !== NULL ? "node/add/{$bundle}" : NULL;
  if (floatval(\Drupal::VERSION) >= 8.4) {
    $edit['status[value]'] = FALSE;
    $this
      ->drupalPostForm($path, $edit, t('Save'));
  }
  else {
    $this
      ->drupalPostForm($path, $edit, t('Save as unpublished'));
  }
}