You are here

public function ColectomyTestCase::testColectomyBodyNoColon in Colectomy 7

Sets the label to 'abovec' on the body field and asserts the lack of a colon.

File

tests/colectomy.test, line 38

Class

ColectomyTestCase
Tests the visibility of the Colectomy managed labels.

Code

public function testColectomyBodyNoColon() {

  // Change the label display mode on the body field.
  $edit = array(
    'fields[body][label]' => 'abovec',
  );
  $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 does not have a colon.
  $this
    ->assertText('Body ', 'Body label found');
}