You are here

private function RangeFieldWidgetBaseWebTestCase::assertFieldPropertyByText in Range 7

Asserts that a given field property with a given text exists.

Parameters

string $xpath: The xpath string to use in the search.

string $text: Value of the field property.

string $message: Message to display.

Return value

bool TRUE on pass, FALSE on fail.

3 calls to RangeFieldWidgetBaseWebTestCase::assertFieldPropertyByText()
RangeFieldWidgetBaseWebTestCase::assertFieldLabel in tests/range.base.test
Asserts that a field label with a given text exists.
RangeFieldWidgetBaseWebTestCase::assertFieldPrefix in tests/range.base.test
Asserts that a field prefix with a given text exists.
RangeFieldWidgetBaseWebTestCase::assertFieldSuffix in tests/range.base.test
Asserts that a field suffix with a given text exists.

File

tests/range.base.test, line 332
Contains range base test classes.

Class

RangeFieldWidgetBaseWebTestCase
Base class for the range module's tests.

Code

private function assertFieldPropertyByText($xpath, $text, $message) {
  $result = $this
    ->xpath($xpath . '[normalize-space(text())=:text]', array(
    ':text' => $text,
  ));
  return $this
    ->assertTrue($result, $message);
}