public function testMedias()
{
$I = $this->codeGuy;
$items = array(array('image' => 'image.png', 'heading' => 'Media heading', 'content' => 'Content text', 'items' => array(array('image' => '#', 'heading' => 'Media heading', 'content' => 'Content text'), array('image' => '#', 'heading' => 'Media heading', 'content' => 'Content text', 'visible' => false))), array('heading' => 'Media heading', 'content' => 'Content text'));
$html = TbHtml::medias($items);
$body = $I->createNode($html, 'body');
$medias = $body->filter('div.media');
$first = $medias->first();
$I->seeNodeChildren($first, array('a.pull-left', 'div.media-body'));
$img = $first->filter('img.media-object');
$I->seeNodeAttribute($img, 'src', 'image.png');
$mediaBody = $first->filter('div.media-body');
$I->seeNodeChildren($mediaBody, array('h4.media-heading', 'div.media'));
$I->seeNodeText($mediaBody, 'Content text');
$h4 = $body->filter('h4.media-heading');
$I->seeNodeText($h4, 'Media heading');
$I->seeNodeNumChildren($mediaBody, 1, 'div.media');
$last = $medias->last();
$I->seeNodeChildren($last, array('div.media-body'));
$html = TbHtml::medias(array());
$this->assertEquals('', $html);
}