protected function RenderElementTypesTest::assertTargetAction in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 4.0.x tests/src/Functional/Render/Element/RenderElementTypesTest.php \Drupal\Tests\lingotek\Functional\Render\Element\RenderElementTypesTest::assertTargetAction()
- 3.6.x tests/src/Functional/Render/Element/RenderElementTypesTest.php \Drupal\Tests\lingotek\Functional\Render\Element\RenderElementTypesTest::assertTargetAction()
- 3.7.x tests/src/Functional/Render/Element/RenderElementTypesTest.php \Drupal\Tests\lingotek\Functional\Render\Element\RenderElementTypesTest::assertTargetAction()
2 calls to RenderElementTypesTest::assertTargetAction()
- RenderElementTypesTest::testLingotekTargetStatus in tests/
src/ Functional/ Render/ Element/ RenderElementTypesTest.php - Tests #type 'lingotek_source_status'.
- RenderElementTypesTest::testLingotekTargetStatuses in tests/
src/ Functional/ Render/ Element/ RenderElementTypesTest.php - Tests #type 'lingotek_source_statuses'.
File
- tests/
src/ Functional/ Render/ Element/ RenderElementTypesTest.php, line 506
Class
- RenderElementTypesTest
- Tests the markup of lingotek render element types passed to \Drupal::service('renderer')->render().
Namespace
Drupal\Tests\lingotek\Functional\Render\ElementCode
protected function assertTargetAction($text, $url) {
$link = $this
->xpath('//ul[contains(@class,lingotek-target-actions)]//li//a[@href="' . $url . '" and text()="' . $text . '"]');
$this
->assertCount(1, $link, 'Action exists.');
}