You are here

function ReadMoreControlTestCase::setNodeFieldDisplay in Read More Control 7

Helper method to set a node field display.

1 call to ReadMoreControlTestCase::setNodeFieldDisplay()
ReadMoreControlTestCase::addNumberIntegerField in ./readmorecontrol.test
Adds a number_integer field and sets the default formatter options.

File

./readmorecontrol.test, line 324
Tests for readmorecontrol.module.

Class

ReadMoreControlTestCase
Tests for number field types.

Code

function setNodeFieldDisplay($entity_type, $field_name, $display) {
  $this
    ->drupalGet("admin/structure/types/manage/{$entity_type}/display");
  $edit = array(
    "fields[{$field_name}][type]" => $display,
  );
  $this
    ->drupalPost(NULL, $edit, t('Save'));
}