function BookModuleTestCase::generateOutlinePattern in SimpleTest 6
Create a regular expression to check for the sub-nodes in the outline.
Parameters
array $nodes Nodes to check in outline.:
1 call to BookModuleTestCase::generateOutlinePattern()
- BookModuleTestCase::checkBookNode in tests/
book_module.test - Checks the outline of sub-pages; previous, up, and next; and check printer friendly version.
File
- tests/
book_module.test, line 104
Class
Code
function generateOutlinePattern($nodes) {
$outline = '';
foreach ($nodes as $node) {
$outline .= '(node\\/' . $node->nid . ')(.*?)(' . $node->title . ')(.*?)';
}
return '/<div id="book-navigation-' . $this->book->nid . '"(.*?)<ul(.*?)' . $outline . '<\\/ul>/s';
}