Skip to content
Snippets Groups Projects
Commit 327eeaf5 authored by Ghislain Loas's avatar Ghislain Loas
Browse files

Merge branch...

Merge branch 'hotline#31887_l_extension_de_recherche_vers_gallica_ne_fonctionne_pas' into 'hotline-master'

Hotline#31887 l extension de recherche vers gallica ne fonctionne pas

See merge request !1195
parents 0a37ce56 d8e21108
Branches
Tags
3 merge requests!1267Master,!1221Master,!1220Hotline master
- ticket #31887 : L'extension de recherche vers Gallica fonctionne pas
\ No newline at end of file
......@@ -715,7 +715,7 @@ class Class_AdminVar extends Storm_Model_Abstract {
public function getValeur() {
return stripslashes($this->_get('valeur'));
return $this->_get('valeur');
}
......
......@@ -796,7 +796,7 @@ class AdminIndexControllerAdminVarEditSearchAlsoInPostTest
/** @test */
public function varShouldContainsUrl() {
$this->assertContains('http://jumelles.fr/?q=%s',
Class_AdminVar::find('SEARCH_ALSO_IN')->getValeur());
$this->assertEquals('http://jumelles.fr/?q=%s',
json_decode(Class_AdminVar::find('SEARCH_ALSO_IN')->getValeur())->site_url[0]);
}
}
......@@ -111,10 +111,12 @@ class RechercheControllerSearchExtensionEnabledTest
protected function _extensionSites() {
return ['site_label' => ['Jumel',
'Incomplete',
'Trouvons.org',],
'Trouvons.org',
'Gallica'],
'site_url' => ['http://www.jumel39.fr/rechercher?search_api_views_fulltext=%s',
'',
'http://trouvons.org/#q=%s']];
'http://trouvons.org/#q=%s',
'http://gallica.bnf.fr/services/engine/search/sru?operation=searchRetrieve&version=1.2&query=(gallica all "%s")']];
}
......@@ -142,6 +144,13 @@ class RechercheControllerSearchExtensionEnabledTest
$this->assertXPathContentContains('//a[contains(@href, "#q=sport")]',
'Trouvons.org');
}
/** @test */
public function gallicaLinkShouldBeRendered() {
$this->assertXPathContentContains('//a[contains(@href, "gallica all ")]',
'Gallica');
}
}
......
......@@ -83,17 +83,6 @@ class AdminVarTestGet extends AdminVarTestCase {
}
/** @test */
public function getVarShouldStripSlashes() {
$this->fixture('Class_AdminVar',
['id' => 'JS_STAT',
'valeur' => addslashes('<script type="text/javascript">\'test\'')]);
$this->assertEquals('<script type="text/javascript">\'test\'',
Class_AdminVar::get('JS_STAT'));
}
/** @test */
public function unleashFacetDescriptionShouldContainsLinkToRemoteFiles() {
$this->fixture('Class_AdminVar',
......
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