You are here

protected function LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
  2. 3.0.x tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
  3. 3.1.x tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
  4. 3.2.x tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
  5. 3.3.x tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
  6. 3.4.x tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
  7. 3.5.x tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
  8. 3.6.x tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
  9. 3.7.x tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
  10. 3.8.x tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php \Drupal\Tests\lingotek\Functional\LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
1 call to LingotekUtilitiesDisassociateAllDocumentsTest::createAndCancelATerm()
LingotekUtilitiesDisassociateAllDocumentsTest::testDisassociateAllDocumentsWithCancelledDocuments in tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php

File

tests/src/Functional/LingotekUtilitiesDisassociateAllDocumentsTest.php, line 361

Class

LingotekUtilitiesDisassociateAllDocumentsTest
Tests disassociating all site documents.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function createAndCancelATerm() {
  $bundle = $this->vocabulary
    ->id();

  // Create a term.
  $edit = [];
  $edit['name[0][value]'] = 'Llamas are cool';
  $edit['description[0][value]'] = 'Llamas are very cool';
  $edit['langcode[0][value]'] = 'en';
  $this
    ->drupalPostForm("admin/structure/taxonomy/manage/{$bundle}/add", $edit, t('Save'));
  $this
    ->goToContentBulkManagementForm('taxonomy_term');
  $edit = [
    'table[2]' => TRUE,
    $this
      ->getBulkOperationFormName() => $this
      ->getBulkOperationNameForCancel('taxonomy_term'),
  ];
  $this
    ->drupalPostForm(NULL, $edit, $this
    ->getApplyActionsButtonLabel());
}