1 node_type_example.test public NodeTypeExampleTest::testBodyLabel()

Checks whether the body label is "Example description."

File

modules/examples/node_type_example/tests/node_type_example.test, line 86
Simpletest case for the Node Type Example module.

Class

NodeTypeExampleTest
Functionality tests for The Node Type Example module.

Code

public function testBodyLabel() {
  $account = $this->backdropCreateUser(array('access content', 'create node_type_example content'));
  $this->backdropLogin($account);

  // Request a node add node-example page.
  // Test whether the body label is "Example description"; use
  // $this->assertRaw to check for the body label and not some other text.
  $this->backdropGet('node/add/node-type-example');
  $this->assertResponse(200, 'node/add/node-type-example page found');
  $this->assertRaw('<label for="edit-body-und-0-value">Example description</label>', "The body label is 'Example description'");
}