diff --git a/tests/library/ZendAfi/View/Helper/Notice/UnimarcTest.php b/tests/library/ZendAfi/View/Helper/Notice/UnimarcTest.php index f9cb30df65f89db83d8ab87b2df16da72221c05b..97ac9d39ab57dbed35f39c1f39bab343ebd1ec29 100644 --- a/tests/library/ZendAfi/View/Helper/Notice/UnimarcTest.php +++ b/tests/library/ZendAfi/View/Helper/Notice/UnimarcTest.php @@ -25,30 +25,47 @@ parent::setUp(); $this->_helper = new ZendAfi_View_Helper_Notice_Unimarc(); $this->_helper->setView(new ZendAfi_Controller_Action_Helper_View()); - $this->_html = $this->_helper->notice_Unimarc($this->fixture('Class_Notice', - ['id' => 1, - 'titre' => 'Pomme et Ananas', - 'clef_alpha' => 'POMMEETANANAS', - 'facettes' => 'A1 Q9', - 'date_maj' => '01/01/2015', - 'unimarc' => ''])); + $this->_html = $this->_helper + ->notice_Unimarc($this->fixture('Class_Notice', + ['id' => 1, + 'titre' => 'Pomme et Ananas', + 'clef_alpha' => 'POMMEETANANAS', + 'alpha_titre' => 'POM POMS ANANA ANANAS', + 'alpha_auteur' => 'AUTEUR AUTEURS', + 'facettes' => 'A1 Q9', + 'date_maj' => '01/01/2015', + 'date_creation' => '09/10/2017', + 'unimarc' => '', + 'url_vignette' => 'https://thumbs.net/xXv9873ct'])); } /** @test */ public function alphaKeyShouldBePresent() { - $this->assertContains('Clé alpha: POMMEETANANAS', $this->_html); + $this->assertXPathContentContains($this->_html, '//td', 'POMMEETANANAS'); } /** @test */ public function dateMajShouldBePresent() { - $this->assertContains('Mis à jour le: 01/01/2015', $this->_html); + $this->assertXPathContentContains($this->_html, '//td', '01/01/2015'); + } + + + /** @test */ + public function noverltyDateShouldBePresent() { + $this->assertXPathContentContains($this->_html, '//td', '09/10/2017'); } /** @test */ public function facetsShouldBePresent() { - $this->assertContains('Facettes: A1 Q9', $this->_html); + $this->assertXPathContentContains($this->_html, '//td', 'A1 Q9'); + } + + + /** @test */ + public function thumbnailUrlShouldBePresent() { + $this->assertXPathContentContains($this->_html, '//td', 'https://thumbs.net/xXv9873ct'); } }