1 node_example.test public NodeExampleTestCase::testBodyLabel()

Check the value of body label.

Checks whether body label has a value of "Example Description"


modules/examples/node_example/node_example.test, line 93
Simpletest case for node_example module.


Functionality tests for node example module.


public function testBodyLabel() {
  // Create and login user.
  $account = $this->backdropCreateUser(array('access content', 'create node_example content'));

  // Request a node add node-example page.
  // Test whether the body label equals 'Example Description'.
  // Use '$this->assertRaw' to make certain to test the body label and not
  // some other text.
  $this->assertResponse(200, 'node/add/node-example page found');
  $this->assertRaw('<label for="edit-body-und-0-value">Example Description </label>', 'Body label equals \'Example Description\'');