<?php /** * Copyright (c) 2012, 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 */ require_once 'AbstractControllerTestCase.php'; class RechercheControllerHistoriqueRechercheTest extends AbstractControllerTestCase { public function setUp() { parent::setUp(); Class_Users::getIdentity()->beAdminPortail(); $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)]; $this->dispatch('/opac/recherche/saisie', true); } /** @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")]'); } } ?>