diff --git a/application/modules/opac/controllers/AbonneController.php b/application/modules/opac/controllers/AbonneController.php index 53bfdfe9c02291150b6f6297b3effa825ab22c4b..75c3cc4391a0d0cb97f0eabda801867457e4ed67 100644 --- a/application/modules/opac/controllers/AbonneController.php +++ b/application/modules/opac/controllers/AbonneController.php @@ -318,7 +318,7 @@ class AbonneController extends ZendAfi_Controller_Action { $this->view->error = isset($fiche_sigb['erreur']) ? $fiche_sigb["erreur"] : ''; $this->view->user = $this->_user; - $this->view->interdiction_modif=Class_AdminVar::get('INTERDIRE_MODIF_FICHE_ABONNE'); + $this->view->interdiction_modif = Class_AdminVar::get('INTERDIRE_MODIF_FICHE_ABONNE'); } diff --git a/application/modules/opac/views/scripts/abonne/fiche.phtml b/application/modules/opac/views/scripts/abonne/fiche.phtml index c62e861dfb0198ed6d58162f96c47bdf4532be92..f260ecd11b8e01500353010f8c91a0db83caa729 100644 --- a/application/modules/opac/views/scripts/abonne/fiche.phtml +++ b/application/modules/opac/views/scripts/abonne/fiche.phtml @@ -1,7 +1,7 @@ <?php $this->openBoite($this->_("Votre fiche")); -echo $this->abonne_AccesFiche($this->user,$this->interdiction_modif); +echo $this->abonne_AccesFiche($this->user, $this->interdiction_modif); echo $this->abonne_Abonnement($this->user); echo $this->abonne_Prets($this->user); echo $this->abonne_Reservations($this->user); @@ -16,4 +16,4 @@ if ($this->error) echo sprintf('<div class="error">%s</div>', $this->error); $this->closeBoite(); -?> \ No newline at end of file +?> diff --git a/library/Class/WebService/SIGB/VSmart/BorrowerReader.php b/library/Class/WebService/SIGB/VSmart/BorrowerReader.php index 7112dbcdcb8ba52bd869b949d609b422837b56c2..4ce4d4d5039168a96bcc04f58ffbda8600890c0a 100644 --- a/library/Class/WebService/SIGB/VSmart/BorrowerReader.php +++ b/library/Class/WebService/SIGB/VSmart/BorrowerReader.php @@ -81,7 +81,7 @@ class Class_WebService_SIGB_VSmart_BorrowerReader { * @param string $data */ public function endOriginalBarcode($data) { - $this->_emprunteur->setId($data)->beValid(); + $this->_emprunteur->setId($data); } diff --git a/library/ZendAfi/View/Helper/Abonne/AccesFiche.php b/library/ZendAfi/View/Helper/Abonne/AccesFiche.php index 86b82ecde6b06e8cda703a7a9dc8009d4b2879d4..052085d83cac9b01176dc131b8dcbcc8cd33cb01 100644 --- a/library/ZendAfi/View/Helper/Abonne/AccesFiche.php +++ b/library/ZendAfi/View/Helper/Abonne/AccesFiche.php @@ -20,9 +20,11 @@ */ class ZendAfi_View_Helper_Abonne_AccesFiche extends Zend_View_Helper_HtmlElement { public function abonne_accesfiche($user,$interdire_modif=false) { - if($interdire_modif==true) $html_modifier_ma_fiche=''; - else $html_modifier_ma_fiche = $this->view->tagImg(URL_SHARED_IMG.'abonnes/modifiermafiche16.png') - .$this->view->_(' Modifier ma fiche'); + if($interdire_modif==true) + $html_modifier_ma_fiche=''; + else $html_modifier_ma_fiche = + $this->view->tagImg(URL_SHARED_IMG.'abonnes/modifiermafiche16.png') + .$this->view->_(' Modifier ma fiche'); $fiche_sigb = $user->getFicheSigb(); if (array_key_exists("fiche", $fiche_sigb)) { diff --git a/tests/application/modules/opac/controllers/AbonneVSmartTest.php b/tests/application/modules/opac/controllers/AbonneVSmartTest.php index 0771cc738f65fec8ab0f7f50a91bae060953edff..8868f557e7bb121db338b30669413d3e1c51e308 100644 --- a/tests/application/modules/opac/controllers/AbonneVSmartTest.php +++ b/tests/application/modules/opac/controllers/AbonneVSmartTest.php @@ -104,6 +104,8 @@ abstract class AbonneVSmartTestCase extends AbstractControllerTestCase { class AbonneVSmartTest extends AbonneVSmartTestCase { public function setUp() { parent::setUp(); + + Class_AdminVar::newInstanceWithId('INTERDIRE_MODIF_FICHE_ABONNE', ['valeur' => false]); $this->dispatch('/opac/abonne/fiche/id/34', true); } @@ -138,7 +140,7 @@ class AbonneVSmartTest extends AbonneVSmartTestCase { /** @test */ function modifierMaFicheShouldBeALinkToPopup() { $this->assertXPathContentContains('//a[@onclick="openIFrameDialog(\'http://12.34.56.78/moulins/LoginWebSSo.csp\');"]', - 'Modifier ma fiche'); + 'Modifier ma fiche'); } /** @test */ diff --git a/tests/library/Class/WebService/SIGB/VSmartTest.php b/tests/library/Class/WebService/SIGB/VSmartTest.php index fa2a5ca49fd3965c20ec4bd4e1dc186eaea5ca08..7a7393fd518973066ce645cfd3564bdf80f78d42 100644 --- a/tests/library/Class/WebService/SIGB/VSmartTest.php +++ b/tests/library/Class/WebService/SIGB/VSmartTest.php @@ -260,8 +260,8 @@ class VSmartServiceWithEmprunteurEvelyneTest extends VSmartServiceTestCase { /** @test */ - public function emprunteurShouldBeValid() { - $this->assertTrue($this->evelyne->isValid()); + public function emprunteurShouldNotBeValid() { + $this->assertFalse($this->evelyne->isValid()); } }