You are here

protected function ViewTestBase::helperButtonHasLabel in Views (for Drupal 7) 8.3

Helper function to check whether a button with a certain id exists and has a certain label.

2 calls to ViewTestBase::helperButtonHasLabel()
ExposedFormTest::testExposedAdminUi in lib/Drupal/views/Tests/Plugin/ExposedFormTest.php
Tests the admin interface of exposed filter and sort items.
ExposedFormTest::testRenameResetButton in lib/Drupal/views/Tests/Plugin/ExposedFormTest.php
Tests, whether and how the reset button can be renamed.

File

lib/Drupal/views/Tests/ViewTestBase.php, line 167
Definition of Drupal\views\Tests\ViewTestBase.

Class

ViewTestBase
Abstract class for views testing.

Namespace

Drupal\views\Tests

Code

protected function helperButtonHasLabel($id, $expected_label, $message = 'Label has the expected value: %label.') {
  return $this
    ->assertFieldById($id, $expected_label, t($message, array(
    '%label' => $expected_label,
  )));
}