You are here

protected function TestBase::assertSettingsSummary in Double Field 4.x

Same name and namespace in other branches
  1. 8.3 tests/src/FunctionalJavascript/TestBase.php \Drupal\Tests\double_field\FunctionalJavascript\TestBase::assertSettingsSummary()

Assets formatter summary.

10 calls to TestBase::assertSettingsSummary()
FormatterTest::testAllowedValues in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.
FormatterTest::testBooleanAndString in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.
FormatterTest::testDateAndUri in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.
FormatterTest::testDetailsFormatter in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.
FormatterTest::testEmailAndTelephone in tests/src/FunctionalJavascript/FormatterTest.php
Test callback.

... See full list

File

tests/src/FunctionalJavascript/TestBase.php, line 237

Class

TestBase
Base class for Double Field JavaScript tests.

Namespace

Drupal\Tests\double_field\FunctionalJavascript

Code

protected function assertSettingsSummary(array $expected_summary) : void {
  $xpath = sprintf('//tr[@id = "%s"]/td[@class = "field-plugin-summary-cell"]/div[@class = "field-plugin-summary"]', str_replace('_', '-', $this->fieldName));
  $actual_summary = explode('<br>', $this
    ->xpath($xpath)[0]
    ->getHtml());
  self::assertEquals($expected_summary, $actual_summary);
}