You are here

protected function RenderElementTypesTest::assertNoTargetAction in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 4.0.x tests/src/Functional/Render/Element/RenderElementTypesTest.php \Drupal\Tests\lingotek\Functional\Render\Element\RenderElementTypesTest::assertNoTargetAction()
  2. 3.7.x tests/src/Functional/Render/Element/RenderElementTypesTest.php \Drupal\Tests\lingotek\Functional\Render\Element\RenderElementTypesTest::assertNoTargetAction()
  3. 3.8.x tests/src/Functional/Render/Element/RenderElementTypesTest.php \Drupal\Tests\lingotek\Functional\Render\Element\RenderElementTypesTest::assertNoTargetAction()
2 calls to RenderElementTypesTest::assertNoTargetAction()
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 345

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 assertNoTargetAction($text, $url) {

  // Should be better with ul[@class="lingotek-target-actions"], but somehow doesn't work.
  $link = $this
    ->xpath('//ul//li//a[@href="' . $url . '" and text()="' . $text . '"]');
  $this
    ->assertCount(0, $link, 'Action exists.');
}