You are here

function i18n_API_Tests::assertContent in Internationalization 6

Check some nodes are displayed, some are not

1 call to i18n_API_Tests::assertContent()
i18n_API_Tests::testBasicAPI in tests/i18n_api.test

File

tests/i18n_api.test, line 73

Class

i18n_API_Tests

Code

function assertContent($display, $hide = array()) {
  $languages = language_list();
  foreach ($display as $node) {
    $name = $node->language ? $languages[$node->language]->name : 'Language neutral';
    $this
      ->assertText($node->title, 'Content displayed for ' . $name);
  }
  foreach ($hide as $node) {
    $name = $node->language ? $languages[$node->language]->name : 'Language neutral';
    $this
      ->assertNoText($node->title, 'Content not displayed for ' . $name);
  }
}