You are here

protected function ContentLanguageAccessTestCase::createContents in Content Language Access 7

Same name and namespace in other branches
  1. 6 content_language_access.test \ContentLanguageAccessTestCase::createContents()

Creates a content for each language for the tests.

1 call to ContentLanguageAccessTestCase::createContents()
ContentLanguageAccessTestCase::setUp in ./content_language_access.test
Implements setUp().

File

./content_language_access.test, line 74
Test suite for content language access module.

Class

ContentLanguageAccessTestCase
Defines the content language access test class.

Code

protected function createContents() {
  $this
    ->drupalLogin($this->admin_user);
  $languages = $this
    ->getLanguageList();
  foreach ($languages as $language_key => $language) {
    $settings = array();
    $settings['title'] = 'Test ' . $language->name;
    $settings['body'][$language_key][0] = array();
    $settings['language'] = $language_key;
    $this->nodes[$language_key] = $this
      ->drupalCreateNode($settings);
  }
}