You are here

function RelationUITestCase::testRelationEndpointsField in Relation 7

Tests endpoint field settings.

File

tests/relation_ui.test, line 186
Tests for Relation UI module.

Class

RelationUITestCase
Tests Relation UI.

Code

function testRelationEndpointsField() {
  $field_label = $this
    ->randomName();
  $edit = array(
    'instance[label]' => $field_label,
  );
  $this
    ->drupalPost('admin/structure/relation/manage/symmetric/fields/endpoints', $edit, t('Save settings'));
  $this
    ->assertText(t('Saved @label configuration.', array(
    '@label' => $field_label,
  )));
  $this
    ->drupalGet('admin/structure/relation/manage/symmetric/fields');
  $this
    ->assertFieldByXPath('//table[@id="field-overview"]//td[1]', $field_label, t('Endpoints field label appears to be changed in the overview table.'));
}