1.20.x link.attribute.test | protected LinkAttributeCrudTest::createNodeForTesting($title, $url, $node_title = '') |
File
- modules/
link/ tests/ link.attribute.test, line 25 - Basic simpletests to test options on link module.
Class
Code
protected function createNodeForTesting($title, $url, $node_title = '') {
$this->backdropGet('node/add/page');
if (!$node_title) {
$node_title = $this->randomName(20);
}
$edit = array(
'title' => $node_title,
);
if ($url) {
$edit[$this->field_name . '[und][0][url]'] = $url;
}
if ($title) {
$edit[$this->field_name . '[und][0][title]'] = $title;
}
$this->backdropPost(NULL, $edit, t('Save'));
$this->assertText(t('Basic page @title has been created', array('@title' => $node_title)));
}