/** * Tests whether exhibit_builder_page_nav() returns the correct page navigation html * * @uses exhibit_builder_page_nav() **/ public function testTitleOutput() { // Test the page nav when the page titles are used as the link texts $html = ''; $html .= '<ul class="exhibit-page-nav">' . "\n"; $html .= '<li>'; $html .= '<a class="exhibit-page-title" href="' . $this->basePageUrl . '">Exhibit Title</a>'; $html .= '</li>' . "\n"; $html .= '<li>'; $html .= '<a class="exhibit-page-title" href="' . $this->basePageUrl . '/page1">Exhibit Page Title 1</a>'; $html .= '</li>' . "\n"; $html .= '<li>'; $html .= '<a class="exhibit-page-title" href="' . $this->basePageUrl . '/page1/page2">Exhibit Page Title 2</a>'; $html .= '</li>' . "\n"; $html .= '<li class="current">'; $html .= '<a class="exhibit-page-title" href="' . $this->basePageUrl . '/page1/page2/page3">Exhibit Page Title 3</a>'; $html .= '</li>' . "\n"; $html .= '</ul>' . "\n"; $this->assertEquals($html, exhibit_builder_page_nav($this->exhibitPage)); $this->assertEquals($html, exhibit_builder_page_nav($this->exhibitPage)); }
<?php echo head(array('title' => metadata('exhibit', 'title'), 'bodyclass' => 'exhibits summary')); ?> <h1><?php echo metadata('exhibit', 'title'); ?> </h1> <?php echo exhibit_builder_page_nav(); ?> <div id="primary"> <?php if ($exhibitDescription = metadata('exhibit', 'description', array('no_escape' => true))) { ?> <div class="exhibit-description"> <?php echo $exhibitDescription; ?> </div> <?php } ?> <?php if ($exhibitCredits = metadata('exhibit', 'credits')) { ?> <div class="exhibit-credits"> <h3><?php