Commit 5690c7cb authored by Ghislain Loas's avatar Ghislain Loas

hotline #71154 plug logger to dilicom hub calls

parent 973691c6
......@@ -154,8 +154,8 @@ class RechercheController extends ZendAfi_Controller_Action {
if (($ig = Zend_Controller_Front::getInstance()
->getPlugin('ZendAfi_Controller_Plugin_InspectorGadget'))
&& $ig->isEnabled())
$ig->addButton($this->_('Configuration de la recherche'),
$this->view->searchInspector($this->moteur));
$ig->addButton(new Class_Entity(['Label' => $this->_('Configuration de la recherche'),
'Content' => $this->view->searchInspector($this->moteur)]));
}
......
......@@ -38,7 +38,9 @@ class Class_Loan_PnbLoader extends Storm_Model_Loader {
public function findAllOngoingOfItem($item) {
return $this->findAllOngoingBy(['order_line_id' => $item->getOrderLineId()]);
$loans = $this->findAllOngoingBy(['order_line_id' => $item->getOrderLineId()]);
(new Class_WebService_BibNumerique_Dilicom_Hub())->updateLoansReturnDate($loans);
return $loans;
}
......
......@@ -245,9 +245,20 @@ class Class_WebService_BibNumerique_Dilicom_Hub extends Class_WebService_Abstrac
protected function dilicomCall($service, $params) {
return $this->httpGet($this->buildUrl($service, $params),
['auth' => ['user' =>Class_AdminVar::get('DILICOM_PNB_GLN_COLLECTIVITE'),
'password' => Class_AdminVar::get('DILICOM_PNB_PWD_COLLECTIVITE')]]);
$response = $this->httpGet($this->buildUrl($service, $params),
['auth' => ['user' =>Class_AdminVar::get('DILICOM_PNB_GLN_COLLECTIVITE'),
'password' => Class_AdminVar::get('DILICOM_PNB_PWD_COLLECTIVITE')]]);
$this->_log();
return $response;
}
protected function _log() {
if (($ig = Zend_Controller_Front::getInstance()
->getPlugin('ZendAfi_Controller_Plugin_InspectorGadget'))
&& $ig->isEnabled())
$ig->log();
}
......
......@@ -160,8 +160,7 @@ class ZendAfi_Controller_Plugin_InspectorGadget extends Zend_Controller_Plugin_A
return $this
->renderDialog($this->_('Appels webservices (%s)', count($items)),
['title' => $this->_('Liste des appels webservices'),
'content' => $content])
;
'content' => $content]);
}
......
......@@ -72,4 +72,23 @@ class RechercheControllerViewnoticeDilicomWithInspectorGadgetTest extends Admin_
public function buttonDilicomShouldBePresent() {
$this->assertXPathContentContains('//button', 'Dilicom');
}
}
class RechercheControllerSearchResultWithInspectorGadgetTest extends AbstractControllerTestCase {
protected $_storm_default_to_volatile = true;
public function setUp() {
parent::setUp();
$this->dispatch('/opac/recherche/simple/expressionRecherche/musso/inspector_gadget/1', true);
}
/** @test */
public function buttonConfigurationOfSearchShouldBePresent() {
$this->assertXPathContentContains('//button', 'Configuration de la recherche');
}
}
\ No newline at end of file
Markdown is supported
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