public function Pathautoi18nNodeTest::createNode in Pathauto i18n 7
Helper to create node.
4 calls to Pathautoi18nNodeTest::createNode()
- Pathautoi18nNodeTest::testAutomaticAliasLanguageSelected in tests/
pathauto_i18n_node.test - Test nodes with automatic alias for certain language.
- Pathautoi18nNodeTest::testCleanString in tests/
pathauto_i18n_node.test - Test clearing of string.
- Pathautoi18nNodeTest::testCustomAliasLanguageSelected in tests/
pathauto_i18n_node.test - Test nodes with custom alias for certain language.
- Pathautoi18nNodeTest::testCustomAliasUndefinedLanguage in tests/
pathauto_i18n_node.test - Test nodes with custom alias for undefined language.
File
- tests/
pathauto_i18n_node.test, line 129
Class
- Pathautoi18nNodeTest
- Test functionality for nodes.
Code
public function createNode($language, $pathauto_i18n_status, $pathauto, $alias = FALSE) {
$settings = array(
'type' => 'article',
'title' => $this->title,
'body' => array(
$language => array(
array(
$this
->randomName(64),
),
),
),
'language' => $language,
'path' => array(
'pathauto_i18n_status' => $pathauto_i18n_status,
'pathauto' => $pathauto,
),
);
if (!empty($alias)) {
$settings['path']['alias'] = $alias;
}
$node = $this
->drupalCreateNode($settings);
}