1 locale.test protected LocaleContentFunctionalTest::createNodePost($langcode)

Create node in a specific language.

File

core/modules/locale/tests/locale.test, line 2034
Tests for locale.module.

Class

LocaleContentFunctionalTest
Functional tests for multilingual support on nodes.

Code

protected function createNodePost($langcode) {
  $this->backdropGet('node/add/post');
  $node_title = $this->randomName();
  $node_body = $this->randomName();
  $edit = array(
    'type' => 'post',
    'title' => $node_title,
    'body' => array($langcode => array(array('value' => $node_body))),
    'langcode' => $langcode,
    'promote' => 1,
  );
  return $this->backdropCreateNode($edit);
}