You are here

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

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

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

File

tests/views_query.test, line 87
Tests for Views query features.

Class

ViewsTestCase
Abstract class for views testing

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