/**
  * Tests whether link_to_exhibit() returns the correct link for an exhibit
  *
  * @uses link_to_exhibit()
  */
 public function testLinkToExhibit()
 {
     $exhibit = $this->helper->createNewExhibit(1, 0, 'Exhibit Title', 'Exhibit Description', 'Jim Safley');
     $this->dispatch('exhibits/show/exhibit-title');
     $exhibitLink = link_to_exhibit('Wow');
     $this->assertThat($exhibitLink, $this->stringContains('exhibits/show/exhibit-title" >Wow</a>'));
     $exhibitLink = link_to_exhibit('Wow', array('class' => 'zany', 'id' => 'wowlink'));
     $this->assertThat($exhibitLink, $this->stringContains('exhibits/show/exhibit-title" class="zany" id="wowlink">Wow</a>'));
     $exhibit2 = $this->helper->createNewExhibit(1, 0, 'Exhibit Title 2', 'Exhibit Description 2', 'Jim Safley');
     $this->assertEquals('exhibit-title-2', $exhibit2->slug);
     $exhibitLink = link_to_exhibit('Wow', array('class' => 'zany', 'id' => 'wowlink'), null, $exhibit2);
     $this->assertThat($exhibitLink, $this->stringContains('exhibits/show/exhibit-title-2" class="zany" id="wowlink">Wow</a>'));
 }
Example #2
0
                    <?php 
        if ($exhibitImage = record_image($exhibit, 'square_thumbnail', array('class' => 'img-circle imgi'))) {
            ?>
                    <div style="width: 170px; height: 170px"><?php 
            echo exhibit_builder_link_to_exhibit($exhibit, $exhibitImage, array('class' => 'image'));
            ?>
</div>
                            <?php 
        } else {
            ?>
                                <div style="width: 170px; height: 170px; text-align:center; padding-top:3em; background:#fff;" class="img-circle tit_b">&nbsp;</div>             
                            <?php 
        }
        ?>
                            <h3 class="title_ini"><?php 
        echo link_to_exhibit();
        ?>
</h3>                       <?php 
        if ($exhibitImage = record_image($exhibit, 'square_thumbnail')) {
            ?>
                        <?php 
        }
        ?>
                        <?php 
        if ($exhibitDescription = metadata('exhibit', 'description', array('no_escape' => true))) {
            ?>
                            <h3 class="title_ini" style="font-weight:300; font-size:13px; text-align:justify;">
                            <?php 
            $resumo_texto = $exhibit->description;
            $conta_letra = strlen($resumo_texto);
            if ($conta_letra <= 140) {