You are here

protected function ViewsTestCase::helperButtonHasLabel in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 tests/views_query.test \ViewsTestCase::helperButtonHasLabel()

Check whether a button with a certain id exists and has a certain label.

2 calls to ViewsTestCase::helperButtonHasLabel()
ViewsExposedFormTest::testExposedAdminUi in tests/views_exposed_form.test
Tests the admin interface of exposed filter and sort items.
ViewsExposedFormTest::testRenameResetButton in tests/views_exposed_form.test
Tests, whether and how the reset button can be renamed.

File

tests/views_query.test, line 121
Abstract class for views testing.

Class

ViewsTestCase

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,
  )));
}