Skip to content
Snippets Groups Projects
Commit 1804a96d authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

fix tests

parent 31fa69d0
Branches
Tags
1 merge request!2359Sandbox inspectorgadget ui refresh
Pipeline #2616 passed with stage
in 21 minutes and 42 seconds
......@@ -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');
}
}
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment