Newer
Older
<?php
/**
* Copyright (c) 2012, Agence Française Informatique (AFI). All rights reserved.
*
* 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).
*
* 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
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
require_once 'AbstractControllerTestCase.php';
class RechercheControllerHistoriqueRechercheTest extends AbstractControllerTestCase {
$criteres_potter = (new Class_CriteresRecherche)
->setParams(['expressionRecherche' => 'Harry Potter',
'page' => 2]);
$criteres_davis = (new Class_CriteresRecherche)
->setParams(['rech_auteurs' => 'Miles Davis',
'annee_fin' => '1970']);
$session = new Zend_Session_Namespace('historiqueRecherche');
$session->criteres = [serialize($criteres_potter), serialize($criteres_davis)];
/** @test */
public function pageShouldBeHTML5() {
$this->assertHTML5();
}
/** @test */
public function pageShouldContainsSelectTypeDoc() {
$this->assertXPath('//select[@name="type_doc"]');
}
/** @test */
public function configAdminShouldHaveAction1SaisieInUrl() {
$this->assertXPath('//div[@class="configuration_module"]//img[contains(@onclick, "action1=saisie")]');
}