You are here

protected function RenderElementTypesTest::assertSourceAction in Lingotek Translation 4.0.x

Same name and namespace in other branches
  1. 3.8.x tests/src/Functional/Render/Element/RenderElementTypesTest.php \Drupal\Tests\lingotek\Functional\Render\Element\RenderElementTypesTest::assertSourceAction()
1 call to RenderElementTypesTest::assertSourceAction()
RenderElementTypesTest::testLingotekSourceStatus in tests/src/Functional/Render/Element/RenderElementTypesTest.php
Tests #type 'lingotek_source_status'.

File

tests/src/Functional/Render/Element/RenderElementTypesTest.php, line 516

Class

RenderElementTypesTest
Tests the markup of lingotek render element types passed to \Drupal::service('renderer')->render().

Namespace

Drupal\Tests\lingotek\Functional\Render\Element

Code

protected function assertSourceAction($text, $url) {
  $link = $this
    ->xpath('//ul[contains(@class,lingotek-source-actions)]//li//a[@href="' . $url . '" and text()="' . $text . '"]');
  $this
    ->assertCount(1, $link, 'Action exists.');
}