function BookTestCase::generateOutlinePattern
Creates a regular expression to check for the sub-nodes in the outline.
Parameters
array $nodes: An array of nodes to check in outline.
Return value
A regular expression that locates sub-nodes of the outline.
1 call to BookTestCase::generateOutlinePattern()
- BookTestCase::checkBookNode in modules/
book/ book.test - Checks the outline of sub-pages; previous, up, and next.
File
-
modules/
book/ book.test, line 210
Class
- BookTestCase
- Tests the functionality of the Book module.
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';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.