public function ColectomyTestCase::testColectomyBodyWithColon in Colectomy 7
Sets the label to 'above' on the body field and asserts the existence of a colon.
File
- tests/
colectomy.test, line 56
Class
- ColectomyTestCase
- Tests the visibility of the Colectomy managed labels.
Code
public function testColectomyBodyWithColon() {
// Change the label display mode on the body field.
$edit = array(
'fields[body][label]' => 'above',
);
$this
->drupalPost('admin/structure/types/manage/article/display', $edit, t('Save'));
// Create a basic article node.
$edit = array();
$edit['title'] = $this
->randomName(8);
$edit["body[und][0][value]"] = $this
->randomName(16);
$this
->drupalPost('node/add/article', $edit, t('Save'));
// Assert the body label has a colon.
$this
->assertText('Body:', 'Body label found');
}