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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
* 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")]');
}
}
?>