Skip to content
Snippets Groups Projects
Commit a3180e8a authored by Laurent's avatar Laurent
Browse files

hotline #55142 log API harmonization addInfo -> info

parent 2c5ba1e8
2 merge requests!2334Master,!2133Hotline#55142 1 dtouch
Pipeline #1303 failed with stage
in 9 minutes and 24 seconds
......@@ -43,8 +43,8 @@ class Class_Cata_Log {
}
public function addInfo($message, $targets = ['default']) {
return $this->_targetsDo($targets, 'addInfo', [$message]);
public function info($message, $targets = ['default']) {
return $this->_targetsDo($targets, 'info', [$message]);
}
......
......@@ -62,7 +62,7 @@ class Class_Cosmogramme_Integration_PhaseNotice
}
$id_int_bib = $integration->getIdBib();
$this->_log->addInfo($this->_('Préparation des données'));
$this->_log->info($this->_('Préparation des données'));
$nb = $this->_markItemsToBeDeleted($id_int_bib);
$this->_log->addSuccess($this->_('%d exemplaire(s) marqué(s) pour suppression',
......
......@@ -30,7 +30,7 @@ class Class_Systeme_Report_Publication extends Class_WebService_Abstract {
if (!(new ZendAfi_Validate_Url())->isValid($url))
return $this;
$log->addInfo($this->_('Publication du rapport système'));
$log->info($this->_('Publication du rapport système'));
$json = (new ZendAfi_View_Helper_Status_Json())->status_Json();
......
......@@ -29,7 +29,7 @@ class Class_Cata_LogTest extends ModelTestCase {
};
$mock = $this->mock();
foreach(['log', 'addInfo', 'addSuccess', 'addError'] as $method)
foreach(['log', 'info', 'addSuccess', 'addError'] as $method)
$mock->whenCalled($method)->willDo($append_log);
return $mock;
}
......@@ -50,7 +50,7 @@ class Class_Cata_LogTest extends ModelTestCase {
->log('Trying 2.0 version', ['warning', 'error'])
->log('1.0 was buggy', 'error')
->log('Starting', '*')
->addInfo('Gather ingredients', '*')
->info('Gather ingredients', '*')
->addSuccess('250g Sugar')
->addSuccess('250g Butter')
->addError('Not enough Butter', 'default')
......
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