function TextSummaryTestCase::testOnlyTextSummary in Drupal 7
Test sending only summary.
File
- modules/
field/ modules/ text/ text.test, line 392 - Tests for text.module.
Class
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.');
}