diff --git a/VERSIONS_HOTLINE/34924 b/VERSIONS_HOTLINE/34924 new file mode 100644 index 0000000000000000000000000000000000000000..333bc13d2f8354e41ddaa0e53a3c06db513896fa --- /dev/null +++ b/VERSIONS_HOTLINE/34924 @@ -0,0 +1 @@ + - ticket #34924 : Correction du fonctionnement du placemement des bibliothèque sur une carte territoire diff --git a/cosmogramme/php/_init.php b/cosmogramme/php/_init.php index ad42e11baf7f0c1cca5c629f3c92af3b742b327d..783024abbb2f279af2632dcbcf42886ac15ba372 100644 --- a/cosmogramme/php/_init.php +++ b/cosmogramme/php/_init.php @@ -1,7 +1,7 @@ <?php error_reporting(E_ERROR | E_PARSE); -define("PATCH_LEVEL","285"); +define("PATCH_LEVEL","286"); define("APPLI","cosmogramme"); define("COSMOPATH", "/var/www/html/vhosts/opac2/www/htdocs"); diff --git a/library/Class/Bib.php b/library/Class/Bib.php index c7054decd83036532b4cde117be713e5f5c03a6e..95063416810e6bf843f52528178ca8c00fd5102d 100644 --- a/library/Class/Bib.php +++ b/library/Class/Bib.php @@ -277,11 +277,11 @@ class Class_Bib extends Storm_Model_Abstract { if (!$aff_zone = ZendAfi_Filters_Serialize::unserialize($this->getAffZone())) $aff_zone = []; - return array_merge(['profilID' => '', - 'libelle' => '', + return array_merge(['profilID' => '0', + 'libelle' => $this->getVille(), 'posX' => 0, 'posY' => 0, - 'posPoint' => ''], + 'posPoint' => 'gauche'], $aff_zone); } diff --git a/tests/application/modules/admin/controllers/ZoneControllerTest.php b/tests/application/modules/admin/controllers/ZoneControllerTest.php index c8912f80628c006772e641237155c8634f5ebc9d..ab8727b47a8ec210b536702aea3772142c0401b3 100644 --- a/tests/application/modules/admin/controllers/ZoneControllerTest.php +++ b/tests/application/modules/admin/controllers/ZoneControllerTest.php @@ -72,11 +72,18 @@ class ZoneControllerPlacerBibsActionTest extends ZoneControllerTestCase { public function setUp() { parent::setUp(); + $aff_zone = ZendAfi_Filters_Serialize::serialize(['posX' => '25', + 'posY' => '65', + 'posPoint' => 'above', + 'profilID' => '1']); + $this->fixture('Class_Bib', ['id' => 1, 'libelle' => 'Annecy', + 'ville' => 'Annecy', 'id_zone' => 2, - 'visibilite' => 1]); + 'visibilite' => 1, + 'aff_zone' => $aff_zone]); $this->dispatch('admin/zone/placerbibs/id_zone/2', true); } @@ -86,6 +93,13 @@ class ZoneControllerPlacerBibsActionTest extends ZoneControllerTestCase { public function titreShouldBePlacementDesBibSurLaCarte() { $this->assertXPathContentContains('//h1', 'Placement des bibliothèques sur la carte'); } + + + + /** @test */ + public function spanAnnecyShouldBePresentOnTheMap() { + $this->assertXPathContentContains('//div[@id="image_container"]//span[@id="bib1"]', 'Annecy', $this->_response->getBody()); + } }