You are here

protected function ContentLanguageAccessTestCase::getLanguageList in Content Language Access 7

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

Returns the list of languages available.

Parameters

bool $with_neutral_language: Optional, specifies if the function needs to return also the neutral language.

Return value

array With all the languagues available (plus the neutral language)

2 calls to ContentLanguageAccessTestCase::getLanguageList()
ContentLanguageAccessTestCase::createContents in ./content_language_access.test
Creates a content for each language for the tests.
ContentLanguageAccessTestCase::testContentLanguageAccess in ./content_language_access.test
Tests each content in each language.

File

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

Class

ContentLanguageAccessTestCase
Defines the content language access test class.

Code

protected function getLanguageList($with_neutral_language = TRUE) {
  $languages = language_list();
  if ($with_neutral_language) {
    $languages[''] = (object) array(
      'prefix' => '',
      'language' => '',
      'name' => 'Language Neutral',
    );
  }
  return $languages;
}