Example #1
0
 public function testPagerLink()
 {
     $I = $this->codeGuy;
     $html = TbHtml::pagerLink('Link', '#', array('class' => 'item', 'linkOptions' => array('class' => 'link'), 'disabled' => true));
     $li = $I->createNode($html, 'li');
     $I->seeNodeCssClass($li, 'item disabled');
     $a = $li->filter('a');
     $I->seeNodeCssClass($a, 'link');
     $I->seeNodeAttribute($a, 'href', '#');
     $I->seeNodeText($a, 'Link');
     $html = TbHtml::pagerLink('Previous', '#', array('previous' => true));
     $li = $I->createNode($html, 'li.previous');
     $a = $li->filter('a');
     $I->seeNodeAttribute($a, 'href', '#');
     $I->seeNodeText($a, 'Previous');
     $html = TbHtml::pagerLink('Next', '#', array('next' => true));
     $li = $I->createNode($html, 'li.next');
     $a = $li->filter('a');
     $I->seeNodeAttribute($a, 'href', '#');
     $I->seeNodeText($a, 'Next');
 }