public function testMedia() { $I = $this->codeGuy; $html = TbHtml::media('image.png', 'Heading text', 'Content text', array('class' => 'div', 'linkOptions' => array('class' => 'link'), 'imageOptions' => array('class' => 'image', 'alt' => 'Alternative text'), 'contentOptions' => array('class' => 'content'), 'headingOptions' => array('class' => 'heading'))); $div = $I->createNode($html, 'div.media'); $I->seeNodeCssClass($div, 'div'); $I->seeNodeChildren($div, array('a.pull-left', 'div.media-body')); $a = $div->filter('a.pull-left'); $I->seeNodeCssClass($a, 'link'); $I->seeNodeAttribute($a, 'href', '#'); $img = $a->filter('img.media-object'); $I->seeNodeCssClass($img, 'image'); $I->seeNodeAttributes($img, array('src' => 'image.png', 'alt' => 'Alternative text')); $content = $div->filter('div.media-body'); $I->seeNodeCssClass($content, 'content'); $I->seeNodeText($content, 'Content text'); $h4 = $content->filter('h4.media-heading'); $I->seeNodeCssClass($h4, 'heading'); $I->seeNodeText($h4, 'Heading text'); }