function TextSummaryTestCase::testOnlyTextSummary

Test sending only summary.

File

modules/field/modules/text/text.test, line 413

Class

TextSummaryTestCase

Code

function testOnlyTextSummary() {
  // Login as article creator.
  $this->drupalLogin($this->article_creator);
  // Create article with summary but empty body.
  $summary = $this->randomName();
  $edit = array(
    "title" => $this->randomName(),
    "body[und][0][summary]" => $summary,
  );
  $this->drupalPost('node/add/article', $edit, t('Save'));
  $node = $this->drupalGetNodeByTitle($edit['title']);
  $this->assertIdentical($node->body['und'][0]['summary'], $summary, 'Article with with summary and no body has been submitted.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.