You are here

protected function LingotekSettingsTabAccountFormTest::assertTableValue in Lingotek Translation 3.6.x

Same name and namespace in other branches
  1. 8.2 tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()
  2. 4.0.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()
  3. 3.0.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()
  4. 3.1.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()
  5. 3.2.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()
  6. 3.3.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()
  7. 3.4.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()
  8. 3.5.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()
  9. 3.7.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()
  10. 3.8.x tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php \Drupal\Tests\lingotek\Functional\Form\LingotekSettingsTabAccountFormTest::assertTableValue()

Check to see if two values are equal.

Parameters

$field: The field value to check.

$expected: The expected value to check.

$message: (optional) A message to display with the assertion. Do not translate messages: use \Drupal\Component\Utility\SafeMarkup::format() to embed variables in the message text, not t(). If left blank, a default message will be displayed.

Return value

TRUE if the assertion succeeded, FALSE otherwise.

3 calls to LingotekSettingsTabAccountFormTest::assertTableValue()
LingotekSettingsTabAccountFormTest::testTableValues in tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php
Test the table shows the right values.
LingotekSettingsTabAccountFormTest::testTableValuesWithDefaultFilters in tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php
Test the table shows the right values.
LingotekSettingsTabAccountFormTest::testTableWithDefaultProjectWorkflow in tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php
Test the table has and displays the project default option for workflows

File

tests/src/Functional/Form/LingotekSettingsTabAccountFormTest.php, line 113

Class

LingotekSettingsTabAccountFormTest
Tests the Lingotek account settings form.

Namespace

Drupal\Tests\lingotek\Functional\Form

Code

protected function assertTableValue($field, $expected, $message = '') {
  $xpathValue = $this
    ->xpath('//tr[@data-drupal-selector="edit-account-table-' . $field . '-row"]//td[2]');
  $value = $xpathValue[0]
    ->getText();
  return $this
    ->assertEquals($expected, $value, $message);
}