protected function I18nBookNavigationTestBase::outlineTranslation in Book translation 7.2
Test outline translations.
Parameters
bool $use_entity_translation: (optional) Wether to use Entity Translation or not. Defaults to false.
string $group: (optional) Which group to use for the assertions. Defaults to 'testOutlineTranslation'.
4 calls to I18nBookNavigationTestBase::outlineTranslation()
- I18nBookNavigationEntityTranslationTestCase::testEntityTranslationIntegration in tests/
i18n_book_navigation.test - Test entity_translation and title integration.
- I18nBookNavigationTestCase::testI18nMenuIntegration in tests/
i18n_book_navigation.test - Test i18n_menu integration.
- I18nBookNavigationTestCase::testI18nSelectIntegration in tests/
i18n_book_navigation.test - Test i18n_select integration.
- I18nBookNavigationTestCase::testOutlineTranslation in tests/
i18n_book_navigation.test - Test outline translations.
File
- tests/
i18n_book_navigation.test, line 303 - Unit tests for the Book translation module.
Class
- I18nBookNavigationTestBase
- @file Unit tests for the Book translation module.
Code
protected function outlineTranslation($use_entity_translation = FALSE, $group = 'testOutlineTranslation') {
// Create 2 outlines.
list($bid, $nodes) = $this
->createBookOutline('en', $use_entity_translation);
$fr_nodes = $this
->translateNodes($nodes, 'fr', $use_entity_translation);
list($bid_2, $nodes_2) = $this
->createBookOutline('en', $use_entity_translation);
$fr_nodes_2 = $this
->translateNodes($nodes_2, 'fr', $use_entity_translation);
if (!empty($nodes)) {
$this
->outlineTranslationBlockVisibleOnAllPages($nodes, $nodes_2, $fr_nodes, $fr_nodes_2, $group);
$this
->outlineTranslationBlockVisibleOnBookPages($nodes, $nodes_2, $fr_nodes, $fr_nodes_2, $group);
}
}