From a279adb9a87617d388fbc431204c1871d26f0f5a Mon Sep 17 00:00:00 2001 From: efalcy <efalcy@afi-sa.fr> Date: Tue, 5 May 2015 11:14:50 +0200 Subject: [PATCH] dev #15606 patron library pickup : remove debug_break , move patch to php and stormify test --- .../opac/controllers/RechercheController.php | 2 -- cosmogramme/php/_init.php | 2 +- cosmogramme/sql/patch/patch_246.php | 4 ++++ cosmogramme/sql/patch/patch_246.sql | 1 - library/Class/CmsUrlTransformer.php | 3 +-- tests/library/Class/WebService/SIGB/NanookTest.php | 14 +++++--------- 6 files changed, 11 insertions(+), 15 deletions(-) create mode 100644 cosmogramme/sql/patch/patch_246.php delete mode 100644 cosmogramme/sql/patch/patch_246.sql diff --git a/application/modules/opac/controllers/RechercheController.php b/application/modules/opac/controllers/RechercheController.php index 350fa4e78f8..f17e55d1084 100644 --- a/application/modules/opac/controllers/RechercheController.php +++ b/application/modules/opac/controllers/RechercheController.php @@ -585,8 +585,6 @@ class RechercheController extends ZendAfi_Controller_Action { if (Class_CosmoVar::isSiteRetraitResaPatronLibrary()) $code_annexe = $user->getUserIdSite(); - xdebug_break(); - $comm = new Class_CommSigb(); $ret = $comm->reserverExemplaire($id_bib, $id_origine, $code_annexe); diff --git a/cosmogramme/php/_init.php b/cosmogramme/php/_init.php index 48d15b11720..c7b3f3b22d2 100644 --- a/cosmogramme/php/_init.php +++ b/cosmogramme/php/_init.php @@ -2,7 +2,7 @@ // Constantes error_reporting(E_ERROR | E_PARSE); -define("PATCH_LEVEL","245"); +define("PATCH_LEVEL","246"); define("APPLI","cosmogramme"); define("COSMOPATH", "/var/www/html/vhosts/opac2/www/htdocs"); diff --git a/cosmogramme/sql/patch/patch_246.php b/cosmogramme/sql/patch/patch_246.php new file mode 100644 index 00000000000..b17419d26ac --- /dev/null +++ b/cosmogramme/sql/patch/patch_246.php @@ -0,0 +1,4 @@ +<?php +Zend_Db_Table::getDefaultAdapter() + ->query("UPDATE `variables` SET commentaire='Site de retrait à la réservation', liste='0:site de l\'exemplaire\r\n1:proposer le choix\r\n2:site de l\'abonné' WHERE variables.clef='site_retrait_resa' LIMIT 1;"); +?> diff --git a/cosmogramme/sql/patch/patch_246.sql b/cosmogramme/sql/patch/patch_246.sql deleted file mode 100644 index 94250069a87..00000000000 --- a/cosmogramme/sql/patch/patch_246.sql +++ /dev/null @@ -1 +0,0 @@ -UPDATE `variables` SET commentaire='Site de retrait à la réservation', liste='0:site de l\'exemplaire\r\n1:proposer le choix\r\n2:site de l\'abonné' WHERE variables.clef='site_retrait_resa' LIMIT 1; diff --git a/library/Class/CmsUrlTransformer.php b/library/Class/CmsUrlTransformer.php index 1e0c8b4a9be..e7b79d3ac5c 100644 --- a/library/Class/CmsUrlTransformer.php +++ b/library/Class/CmsUrlTransformer.php @@ -65,8 +65,7 @@ class Class_CmsUrlTransformer { } return $contents; } - xdebug_break(); - return static::removeHost($hostname,$basedir, $contents, $replace_count); + return static::removeHost($hostname,$basedir, $contents, $replace_count); } diff --git a/tests/library/Class/WebService/SIGB/NanookTest.php b/tests/library/Class/WebService/SIGB/NanookTest.php index e21bba0a100..e0ecfa97e6f 100644 --- a/tests/library/Class/WebService/SIGB/NanookTest.php +++ b/tests/library/Class/WebService/SIGB/NanookTest.php @@ -78,15 +78,11 @@ abstract class NanookTestCase extends Storm_Test_ModelTestCase { ->setServerRoot('http://localhost:8080/afi_Nanook/ilsdi/') ->setWebClient($this->_mock_web_client); - $annexe_cran = Class_CodifAnnexe::getLoader()->newInstanceWithId(3) - ->setLibelle('Annexe Cran-Gevrier') - ->setIdBib(3) - ->setCode(10); - - Storm_Test_ObjectWrapper::onLoaderOfModel('Class_CodifAnnexe') - ->whenCalled('findFirstBy')->answers(null) - ->whenCalled('findFirstBy')->with(array('id_bib' => 3))->answers($annexe_cran) - ->whenCalled('findFirstBy')->with(array('code' => 10))->answers($annexe_cran); + $this->fixture('Class_CodifAnnexe' , ['id' => 3, + 'libelle' => 'Annexe Cran-Gevrier', + 'id_bib' => 3, + 'code' => 10]); + } } -- GitLab