An error occurred while loading the file. Please try again.
-
Patrick Barroca authored1804a96d
UnimarcTest.php 2.63 KiB
<?php
/**
* Copyright (c) 2012-2014, Agence Française Informatique (AFI). All rights reserved.
*
* BOKEH is free software; you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
* the Free Software Foundation.
*
* There are special exceptions to the terms and conditions of the AGPL as it
* is applied to this software (see README file).
*
* BOKEH is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU AFFERO GENERAL PUBLIC LICENSE for more details.
*
* You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE
* along with BOKEH; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
class ZendAfi_View_Helper_Notice_UnimarcTest extends ViewHelperTestCase {
public function setUp() {
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',
'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->assertXPathContentContains($this->_html, '//td', 'POMMEETANANAS');
}
/** @test */
public function dateMajShouldBePresent() {
$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->assertXPathContentContains($this->_html, '//td', 'A1 Q9');
}
/** @test */
public function thumbnailUrlShouldBePresent() {
$this->assertXPathContentContains($this->_html, '//td', 'https://thumbs.net/xXv9873ct');
}
}