You are here

protected function LingotekInterfaceTranslationTestTrait::assertLingotekInterfaceTranslationRequestTranslationLink in Lingotek Translation 3.5.x

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/LingotekInterfaceTranslationTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTestTrait::assertLingotekInterfaceTranslationRequestTranslationLink()
  2. 3.2.x tests/src/Functional/LingotekInterfaceTranslationTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTestTrait::assertLingotekInterfaceTranslationRequestTranslationLink()
  3. 3.3.x tests/src/Functional/LingotekInterfaceTranslationTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTestTrait::assertLingotekInterfaceTranslationRequestTranslationLink()
  4. 3.4.x tests/src/Functional/LingotekInterfaceTranslationTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTestTrait::assertLingotekInterfaceTranslationRequestTranslationLink()
  5. 3.6.x tests/src/Functional/LingotekInterfaceTranslationTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTestTrait::assertLingotekInterfaceTranslationRequestTranslationLink()
  6. 3.7.x tests/src/Functional/LingotekInterfaceTranslationTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTestTrait::assertLingotekInterfaceTranslationRequestTranslationLink()
  7. 3.8.x tests/src/Functional/LingotekInterfaceTranslationTestTrait.php \Drupal\Tests\lingotek\Functional\LingotekInterfaceTranslationTestTrait::assertLingotekInterfaceTranslationRequestTranslationLink()
9 calls to LingotekInterfaceTranslationTestTrait::assertLingotekInterfaceTranslationRequestTranslationLink()
LingotekInterfaceTranslationTest::testAddingLanguageAllowsRequesting in tests/src/Functional/LingotekInterfaceTranslationTest.php
Tests that a node can be translated using the links on the management page.
LingotekInterfaceTranslationTest::testCheckTranslationStatusWithAnError in tests/src/Functional/LingotekInterfaceTranslationTest.php
Tests that we manage errors when using the check translation status link.
LingotekInterfaceTranslationTest::testClearInterfaceTranslationMetadata in tests/src/Functional/LingotekInterfaceTranslationTest.php
Tests that a node can be translated using the links on the management page.
LingotekInterfaceTranslationTest::testDownloadTranslationWithAnError in tests/src/Functional/LingotekInterfaceTranslationTest.php
Tests that we manage errors when using the download translation link.
LingotekInterfaceTranslationTest::testInterfaceTranslationUsingLinks in tests/src/Functional/LingotekInterfaceTranslationTest.php
Tests that a node can be translated using the links on the management page.

... See full list

File

tests/src/Functional/LingotekInterfaceTranslationTestTrait.php, line 28

Class

LingotekInterfaceTranslationTestTrait
Trait with Lingotek interface translation test assertion helpers.

Namespace

Drupal\Tests\lingotek\Functional

Code

protected function assertLingotekInterfaceTranslationRequestTranslationLink($component, $locale) {
  $basepath = \Drupal::request()
    ->getBasePath();
  $href = $basepath . '/admin/lingotek/interface-translation/request-translation?component=' . $component . '&locale=' . $locale;
  if ($destination = $this
    ->getDestination()) {
    $href .= $destination;
  }
  $this
    ->assertSession()
    ->linkByHrefExists($href, 0);
}