public function LingotekUtilitiesDisassociateAllDocumentsTest::translateTermWithLinks in Lingotek Translation 8
1 call to LingotekUtilitiesDisassociateAllDocumentsTest::translateTermWithLinks()
- LingotekUtilitiesDisassociateAllDocumentsTest::setUp in src/
Tests/ LingotekUtilitiesDisassociateAllDocumentsTest.php - Sets up a Drupal site for running functional and integration tests.
File
- src/
Tests/ LingotekUtilitiesDisassociateAllDocumentsTest.php, line 113
Class
- LingotekUtilitiesDisassociateAllDocumentsTest
- Tests disassociating all site documents.
Namespace
Drupal\lingotek\TestsCode
public function translateTermWithLinks() {
// This is a hack for avoiding writing different lingotek endpoint mocks.
\Drupal::state()
->set('lingotek.uploaded_content_type', 'taxonomy_term');
$bundle = $this->vocabulary
->id();
// Create a term.
$edit = array();
$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');
// Clicking English must init the upload of content.
$this
->clickLink('EN');
// There is a link for checking status.
$this
->clickLink('EN');
// Request the Spanish translation.
$this
->clickLink('ES');
// Check status of the Spanish translation.
$this
->clickLink('ES');
// Download the Spanish translation.
$this
->clickLink('ES');
}