You are here

protected function LingotekTestBase::assertNoTargetError in Lingotek Translation 3.6.x

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

Assert that a content target has not been marked as error.

Parameters

string $label: The label of the row.

string $language: The target language.

string $locale: The target locale.

2 calls to LingotekTestBase::assertNoTargetError()
LingotekEntityTestBulkTranslationTest::testTranslationDownloadWithUnrequestedLocales in tests/src/Functional/LingotekEntityTestBulkTranslationTest.php
Tests that unrequested locales are not marked as error when downloading all.
LingotekNodeBulkTranslationTest::testTranslationDownloadWithUnrequestedLocales in tests/src/Functional/LingotekNodeBulkTranslationTest.php
Tests that unrequested locales are not marked as error when downloading all.

File

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

Class

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

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function assertNoTargetError($label, $language, $locale) {
  $source_error = $this
    ->xpath("//span[contains(@class,'language-icon') and contains(@class,'target-error')  and ./a[contains(text(), '" . strtoupper($language) . "')]]");
  $this
    ->assertEqual(count($source_error), 0, 'The target ' . strtoupper($language) . ' has not been marked as error.');
  $this
    ->assertNoText($label . ' ' . $locale . ' translation download failed. Please try again.');
}