protected function I18nBookNavigationTestBase::outlineTranslationBlockVisibleOnAllPages in Book translation 7.2
Test outline translation with the book block visible on ALL pages.
2 calls to I18nBookNavigationTestBase::outlineTranslationBlockVisibleOnAllPages()
- I18nBookNavigationPanelsTestCase::testPanelsIntegration in tests/
i18n_book_navigation.test - Test panels integration.
- I18nBookNavigationTestBase::outlineTranslation in tests/
i18n_book_navigation.test - Test outline translations.
File
- tests/
i18n_book_navigation.test, line 320 - Unit tests for the Book translation module.
Class
- I18nBookNavigationTestBase
- @file Unit tests for the Book translation module.
Code
protected function outlineTranslationBlockVisibleOnAllPages($nodes, $nodes_2, $fr_nodes, $fr_nodes_2, $group = 'Other') {
variable_set('book_block_mode', 'all pages');
// Check menu links. Should be found 2 or 3 times each time:
// - once in the block
// - once in the breadcrumb
// - one or zero times in the footer navigation
// Check English menu links.
$this
->drupalGet('node/' . $nodes[1]->nid);
$this
->assertText($nodes[0]->title, "Found english book 1 root node title ({$nodes[0]->title}), from book navigation, breadcrumb and footer navigation.", 3, $group);
$this
->assertText($nodes_2[0]->title, "Found english book 2 root node title ({$nodes_2[0]->title}), from book navigation.", 1, $group);
$this
->drupalGet('node/' . $nodes[3]->nid);
$this
->assertText($nodes[0]->title, "Found english book 1 root node title ({$nodes[0]->title}), from book navigation and breadcrumb.", 2, $group);
$this
->assertText($nodes_2[0]->title, "Found english book 2 root node title ({$nodes_2[0]->title}), from book navigation.", 1, $group);
$this
->assertText($nodes[1]->title, "Found english book 1 node 1 title ({$nodes[1]->title}), from book navigation and breadcrumb.", 2, $group);
$this
->assertText($nodes[2]->title, "Found english book 1 node 2 title ({$nodes[2]->title}), from book navigation and footer navigation.", 2, $group);
$this
->assertText($nodes[4]->title, "Found english book 1 node 4 title ({$nodes[4]->title}), from book navigation and footer navigation.", 2, $group);
$this
->assertText($nodes[5]->title, "Found english book 1 node 5 title ({$nodes[5]->title}), from book navigation.", 1, $group);
// Check French menu links.
$this
->drupalGet('fr/node/' . $fr_nodes[1]->nid);
$this
->assertText($fr_nodes[0]->title, "Found french book 1 root node title ({$fr_nodes[0]->title}), from book navigation, breadcrumb and footer navigation.", 3, $group);
$this
->assertText($fr_nodes_2[0]->title, "Found french book 2 root node title ({$fr_nodes_2[0]->title}), from book navigation.", 1, $group);
$this
->drupalGet('fr/node/' . $fr_nodes[3]->nid);
$this
->assertText($fr_nodes[0]->title, "Found french book 1 root node title ({$fr_nodes[0]->title}), from book navigation and breadcrumb.", 2, $group);
$this
->assertText($fr_nodes_2[0]->title, "Found french book 2 root node title ({$fr_nodes_2[0]->title}), from book navigation.", 1, $group);
$this
->assertText($fr_nodes[1]->title, "Found french book 1 node 1 title ({$fr_nodes[1]->title}), from book navigation and breadcrumb.", 2, $group);
$this
->assertText($fr_nodes[2]->title, "Found french book 1 node 2 title ({$fr_nodes[2]->title}), from book navigation and footer navigation.", 2, $group);
$this
->assertText($fr_nodes[4]->title, "Found french book 1 node 4 title ({$fr_nodes[4]->title}), from book navigation and footer navigation.", 2, $group);
$this
->assertText($fr_nodes[5]->title, "Found french book 1 node 5 title ({$fr_nodes[5]->title}), from book navigation.", 1, $group);
}