public function LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError in Lingotek Translation 3.5.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
- 4.0.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
- 3.0.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
- 3.1.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
- 3.2.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
- 3.3.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
- 3.4.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
- 3.6.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
- 3.7.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
- 3.8.x tests/src/Functional/LingotekFieldBodyBulkTranslationTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkTranslationTest::testRequestAllTranslationsWithActionWithAPaymentRequiredError()
Tests that we manage errors when using the request all translations action.
File
- tests/
src/ Functional/ LingotekFieldBodyBulkTranslationTest.php, line 1324
Class
- LingotekFieldBodyBulkTranslationTest
- Tests translating a field using the bulk management form.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testRequestAllTranslationsWithActionWithAPaymentRequiredError() {
\Drupal::state()
->set('lingotek.must_payment_required_error_in_request_translation', TRUE);
$this
->goToConfigBulkManagementForm('node_fields');
// I can init the upload of content.
$this
->assertLingotekUploadLink();
$key = $this
->getBulkSelectionKey('en', 1);
$edit = [
$key => TRUE,
$this
->getBulkOperationFormName() => $this
->getBulkOperationNameForUpload('node_fields'),
];
$this
->drupalPostForm(NULL, $edit, $this
->getApplyActionsButtonLabel());
$this
->assertIdentical('en_US', \Drupal::state()
->get('lingotek.uploaded_locale'));
// I can check current status.
$this
->assertLingotekCheckSourceStatusLink();
// I can request a translation
$this
->assertLingotekRequestTranslationLink('es_MX');
$this
->assertTargetStatus('ES', Lingotek::STATUS_REQUEST);
$edit = [
$key => TRUE,
$this
->getBulkOperationFormName() => $this
->getBulkOperationNameForRequestTranslations('node_fields'),
];
$this
->drupalPostForm(NULL, $edit, $this
->getApplyActionsButtonLabel());
$this
->assertSourceStatus('EN', Lingotek::STATUS_IMPORTING);
$this
->assertTargetStatus('ES', Lingotek::STATUS_REQUEST);
$this
->assertText('Community has been disabled. Please contact support@lingotek.com to re-enable your community.');
}