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

Merge branch...

Merge branch 'hotline#74837_regression_probleme_d_affichage_de_la_localisation_d_une_bibliotheque' into 'hotline'

holtine #74837 fix osm rendering

See merge request !2638
parents 743eafe3 bf24f3b0
Branches
Tags
4 merge requests!2660Master,!2642Master,!2641Hotline,!2638holtine #74837 fix osm rendering
Pipeline #4065 passed with stage
in 34 minutes and 18 seconds
- ticket #74837 : correction de l'affichage du plan d'accès Open Street Map à partir de la fiche bibliothèque.
\ No newline at end of file
...@@ -51,8 +51,8 @@ class ZendAfi_View_Helper_LibrariesMap extends ZendAfi_View_Helper_BaseHelper { ...@@ -51,8 +51,8 @@ class ZendAfi_View_Helper_LibrariesMap extends ZendAfi_View_Helper_BaseHelper {
: ''); : '');
$osm_layer = json_encode(isset($preferences['osm_layer']) $osm_layer = json_encode(isset($preferences['osm_layer'])
? $preferences['osm_layer'] ? $preferences['osm_layer']
: '0'); : 1);
return $this->_tag('div', '', ['id' => $container_id, return $this->_tag('div', '', ['id' => $container_id,
'class' => 'leaflet_osm', 'class' => 'leaflet_osm',
......
...@@ -73,4 +73,41 @@ class ZendAfi_View_Helper_Accueil_LibrariesMapTest extends ViewHelperTestCase { ...@@ -73,4 +73,41 @@ class ZendAfi_View_Helper_Accueil_LibrariesMapTest extends ViewHelperTestCase {
public function dataOsmLayerShouldBe1() { public function dataOsmLayerShouldBe1() {
$this->assertXPath($this->html, '//div[contains(@data-osm-layer, "1")]'); $this->assertXPath($this->html, '//div[contains(@data-osm-layer, "1")]');
} }
}
class ZendAfi_View_Helper_Accueil_LibrariesMapWithOutPreferencesTest extends ViewHelperTestCase {
protected $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
$this->fixture('Class_Lieu',
['id' => 78,
'libelle' => 'Cran-Gevrier']);
$this->fixture('Class_Lieu',
['id' => 65,
'libelle' => 'Valleiry']);
$libraries = [$this->fixture('Class_Bib', ['id' => 3,
'libelle' => 'Cran-Gévrier',
'id_lieu' => 78]),
$this->fixture('Class_Bib', ['id' => 89,
'libelle' => 'Valleiry',
'id_lieu' => 65])];
$this->_helper = new ZendAfi_View_Helper_LibrariesMap();
$this->_helper->setView(new ZendAfi_Controller_Action_Helper_View());
$this->html = $this->_helper->librariesMap($libraries, '1');
}
/** @test */
public function osmLayerShouldBe1() {
$this->assertXpath($this->html, '//div[@data-osm-layer="1"]');
}
} }
\ No newline at end of file
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