carouselIndicators() public static method

Generates an indicator for the carousel.
public static carouselIndicators ( string $target, integer $numSlides, array $htmlOptions = [] ) : string
$target string the CSS selector for the target element.
$numSlides integer the number of slides.
$htmlOptions array additional HTML attributes.
return string the generated indicators.
Example #1
0
 public function testCarouselIndicators()
 {
     $I = $this->codeGuy;
     $html = TbHtml::carouselIndicators('#', 3, array('class' => 'list'));
     $ol = $I->createNode($html, 'ol.carousel-indicators');
     $I->seeNodeCssClass($ol, 'list');
     $I->seeNodeChildren($ol, array('li.active', 'li', 'li'));
     foreach ($ol->filter('li') as $i => $element) {
         $node = $I->createNode($element);
         $I->seeNodeAttributes($node, array('data-target' => '#', 'data-slide-to' => $i));
         $I->seeNodeEmpty($node);
     }
 }