function SimpleTestExampleTestCase::testSimpleTestExampleCreate

Create a simpletest_example node using the node form.

File

simpletest_example/simpletest_example.test, line 69

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->drupalPost('node/add/simpletest-example', $edit, t('Save'));
    $this->assertText(t('SimpleTest Example Node Type @title has been created.', array(
        '@title' => $edit['title'],
    )));
}