protected function LingotekTestBase::assertSourceStatus in Lingotek Translation 3.0.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
- 4.0.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
- 3.1.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
- 3.2.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
- 3.3.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
- 3.4.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
- 3.5.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
- 3.6.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
- 3.7.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
- 3.8.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertSourceStatus()
Assert that a content source has the given status.
Parameters
string $language: The target language.
string $status: The status.
114 calls to LingotekTestBase::assertSourceStatus()
- LingotekConfigBulkProfileTest::testChangeTranslationProfileBulkAfterCancelling in tests/
src/ Functional/ LingotekConfigBulkProfileTest.php - Tests that the translation profiles can be updated with the bulk actions after cancelling.
- LingotekConfigEntityTranslationEditedToPendingTest::testConfigEntityStatusDownloadTarget in tests/
src/ Functional/ LingotekConfigEntityTranslationEditedToPendingTest.php - Tests that a config can be translated using the links on the management page.
- LingotekConfigTranslationEditedToPendingTest::testConfigStatusDownloadTarget in tests/
src/ Functional/ LingotekConfigTranslationEditedToPendingTest.php - Tests that a config can be translated using the links on the management page.
- LingotekContentTypeBulkCancelTest::testContentTypeCancel in tests/
src/ Functional/ LingotekContentTypeBulkCancelTest.php - Tests that a config entity can be cancelled using the bulk operations on the management page.
- LingotekContentTypeBulkCancelTest::testContentTypeCancelTarget in tests/
src/ Functional/ LingotekContentTypeBulkCancelTest.php - Tests that a config entity target can be cancelled using the bulk operations on the management page.
1 method overrides LingotekTestBase::assertSourceStatus()
- LingotekNodeBulkViewsTranslationTest::assertSourceStatus in tests/
src/ Functional/ Views/ LingotekNodeBulkViewsTranslationTest.php - Overwritten, so untracked can be as not shown. Assert that a content source has the given status.
File
- tests/
src/ Functional/ LingotekTestBase.php, line 453
Class
- LingotekTestBase
- Base class for Lingotek test. Performs authorization of the account.
Namespace
Drupal\Tests\lingotek\FunctionalCode
protected function assertSourceStatus($language, $status) {
$status_target = $this
->xpath("//span[contains(@class,'language-icon') and contains(@class,'source-" . strtolower($status) . "') and ./a[contains(text(), '" . strtoupper($language) . "')]]");
// If not found, maybe it didn't have a link.
if (count($status_target) === 1) {
$this
->assertEqual(count($status_target), 1, 'The source ' . strtoupper($language) . ' has been marked with status ' . strtolower($status) . '.');
}
else {
$status_target = $this
->xpath("//span[contains(@class,'language-icon') and contains(@class,'source-" . strtolower($status) . "') and contains(text(), '" . strtoupper($language) . "')]");
$this
->assertEqual(count($status_target), 1, 'The source ' . strtoupper($language) . ' has been marked with status ' . strtolower($status) . '.');
}
}