1 simpletest_example.test public SimpleTestExampleTestCase::testSimpleTestExampleCreate()

Create a simpletest_example node using the node form.

File

modules/examples/simpletest_example/tests/simpletest_example.test, line 51
An example of simpletest tests.

Class

SimpleTestExampleTestCase
The SimpleTestExampleTestCase is a functional test case, meaning that it actually exercises a particular sequence of actions through the web UI. The majority of core test cases are done this way, but the SimpleTest suite also provides unit tests as…

Code

public function testSimpleTestExampleCreate() {
  // Create node to edit.
  $edit = array();
  $edit['title'] = $this->randomName(8);
  $edit["body[und][0][value]"] = $this->randomName(16);
  $this->backdropPost('node/add/simpletest-example', $edit, t('Save'));
  $this->assertText(t('SimpleTest Example Node Type @title has been created.', array('@title' => $edit['title'])));
}