protected function LingotekTestBase::assertManagementFormProfile 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::assertManagementFormProfile()
- 4.0.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertManagementFormProfile()
- 3.1.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertManagementFormProfile()
- 3.2.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertManagementFormProfile()
- 3.3.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertManagementFormProfile()
- 3.4.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertManagementFormProfile()
- 3.5.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertManagementFormProfile()
- 3.6.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertManagementFormProfile()
- 3.7.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertManagementFormProfile()
- 3.8.x tests/src/Functional/LingotekTestBase.php \Drupal\Tests\lingotek\Functional\LingotekTestBase::assertManagementFormProfile()
Asserts a given index of the management table shows a given profile.
Parameters
int $index: The index of the table to check.
string|null $profile: The profile to verify.
1 call to LingotekTestBase::assertManagementFormProfile()
- LingotekNodeBulkFormTest::testDefaultProfile in tests/
src/ Functional/ Form/ LingotekNodeBulkFormTest.php - Tests default profile is shown in the content management page.
File
- tests/
src/ Functional/ LingotekTestBase.php, line 257
Class
- LingotekTestBase
- Base class for Lingotek test. Performs authorization of the account.
Namespace
Drupal\Tests\lingotek\FunctionalCode
protected function assertManagementFormProfile($index, $profile) {
$elements = $this
->xpath("//*[@id='edit-table']/tbody/tr[{$index}]/td[6]");
if ($profile === NULL) {
$this
->assertEqual(0, count($elements), "Profile for {$index} is shown as empty");
}
else {
$shown_profile = $elements[0]
->getHtml();
$this
->assertEqual($profile, $shown_profile, "Profile for {$index} is shown as {$profile}");
}
}