diff --git a/VERSIONS_WIP/52281 b/VERSIONS_WIP/52281 new file mode 100644 index 0000000000000000000000000000000000000000..820f0ef8f7c14b346a8e65de2623e69fabb2ea0d --- /dev/null +++ b/VERSIONS_WIP/52281 @@ -0,0 +1 @@ + - ticket #52281 : publication du rapport d'état du système au début et à la fin des intégrations de données Cosmogramme \ No newline at end of file diff --git a/cosmogramme/php/integre_traite_main.php b/cosmogramme/php/integre_traite_main.php index af80b939a9fec51e04c84bc8faf0a6dece51ae9f..d7b182124faa4ce8ad5ebab826c5051b26272c1a 100644 --- a/cosmogramme/php/integre_traite_main.php +++ b/cosmogramme/php/integre_traite_main.php @@ -601,8 +601,11 @@ if ($phase == 21) // ---------------------------------------------------------------- setVariable("clef_traitements", "0"); setVariable("traitement_phase", "Traitement terminé"); + +startIntegrationPhase('EndProcess'); + $chrono->timeStart = $timeStart; -$log->ecrire("<h4>Fin des traitements</h4>"); + $log->ecrire("Déblocage de la base<br>"); $log->ecrire("Heure : " . date("G:i:s") . BR); $log->ecrire('Temps de traitement : ' . $chrono->end() . BR); diff --git a/library/Class/AdminVar.php b/library/Class/AdminVar.php index b80f6f48b4b5a7d7f22ed32492e5a4d4b3bb1b5c..a989685e50ef65da0e01ed1f2586281d6963b814 100644 --- a/library/Class/AdminVar.php +++ b/library/Class/AdminVar.php @@ -168,7 +168,10 @@ class Class_AdminVarLoader extends Storm_Model_Loader { 'TEXT_REPLACEMENTS' => Class_AdminVar_Meta::newRawText($this->_('Remplacement de textes à la volée. <br/>Ex:<br/>Panier;Sélection<br/>Vous avez %%d paniers;Vous avez %%d sélections')), 'URL_COSMOGRAMME' => Class_AdminVar_Meta::newDefault('')->bePrivate(), 'PACK_MOBILE' => Class_AdminVar_Meta::newOnOff($this->_('Activation des fonctions avancées du téléphone'))->bePrivate(), - 'CNIL_CONSENT_ENABLE' => Class_AdminVar_Meta::newOnOff('Affiche la demande de consentement avant l\'insertion de cookies ou autres traceurs')], + 'CNIL_CONSENT_ENABLE' => Class_AdminVar_Meta::newOnOff('Affiche la demande de consentement avant l\'insertion de cookies ou autres traceurs'), + 'BUID' => Class_AdminVar_Meta::newRawText($this->_('Identifiant unique (attention: la modification de cette variable impactera les outils de suivi de cette installation)'))->bePrivate(), + 'STATUS_REPORT_PUSH_URL' => Class_AdminVar_Meta::newRawText($this->_('URL destinataire du rapport d\'état du système (0 pour désactiver)'), ['value' => 'http://pola.afi-sa.net/smile.php'])->bePrivate(), + 'STATUS_REPORT_TAGS' => Class_AdminVar_Meta::newMultiInput($this->_('Liste des tags à ajouter au rapport d\'état du système'))->bePrivate()], 'cosmogramme' => [ 'DATE_LAST_FULL_INTEGRATION_USERS' => Class_AdminVar_Meta::newDefault($this->_('Date du dernier import total des abonnés (modifié par cosmogramme)')), diff --git a/library/Class/AdminVar/BUID.php b/library/Class/AdminVar/BUID.php new file mode 100644 index 0000000000000000000000000000000000000000..8d3f1d50444eb52e8fb33bc70e6949070e3e2a8a --- /dev/null +++ b/library/Class/AdminVar/BUID.php @@ -0,0 +1,34 @@ +<?php +/** + * Copyright (c) 2012-2014, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +class Class_AdminVar_BUID { + public function getValue() { + if ($buid = Class_AdminVar::get('BUID')) + return $buid; + + $buid = hash('crc32b', + uniqid(array_at('dbname', + Zend_Db_Table::getDefaultAdapter()->getConfig()))); + Class_AdminVar::set('BUID', $buid); + return $buid; + } +} \ No newline at end of file diff --git a/library/Class/Cosmogramme/Integration/PhaseEndProcess.php b/library/Class/Cosmogramme/Integration/PhaseEndProcess.php new file mode 100644 index 0000000000000000000000000000000000000000..13514aeaa442dcefc473ad3da807de3360c9fdcc --- /dev/null +++ b/library/Class/Cosmogramme/Integration/PhaseEndProcess.php @@ -0,0 +1,34 @@ +<?php +/** + * Copyright (c) 2012-2014, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +class Class_Cosmogramme_Integration_PhaseEndProcess extends Class_Cosmogramme_Integration_PhaseAbstract { + const MY_ID = 22; + + protected $_label = 'Fin des traitements'; + + protected function _init($phase) {} + + protected function _execute() { + (new Class_Systeme_Report_Publication())->push($this->_log); + } +} +?> \ No newline at end of file diff --git a/library/Class/Cosmogramme/Integration/PhasePrepareIntegrations.php b/library/Class/Cosmogramme/Integration/PhasePrepareIntegrations.php index 05a460aadf5dea2b3013bfe76d624b42d9140ad6..71ebad6015ddc59c8f014d3647a149e67c258599 100644 --- a/library/Class/Cosmogramme/Integration/PhasePrepareIntegrations.php +++ b/library/Class/Cosmogramme/Integration/PhasePrepareIntegrations.php @@ -27,7 +27,7 @@ class Class_Cosmogramme_Integration_PhasePrepareIntegrations extends Class_Cosmo protected $_ftp_path, $_integration_path, - $_label = 'Déplacement des intégrations en file d\'attente'; + $_label = 'Préparation des intégrations'; @@ -46,7 +46,10 @@ class Class_Cosmogramme_Integration_PhasePrepareIntegrations extends Class_Cosmo public function _execute() { - $this->_log->ecrire('<table class="blank" cellspacing="0" cellpadding="5px">'); + (new Class_Systeme_Report_Publication())->push($this->_log); + + $this->_log->ecrire('<h4>' . $this->_('Déplacement des intégrations en file d\'attente') . '</h4>'); + $this->_log->ecrire('<br><table class="blank" cellspacing="0" cellpadding="5px">'); foreach (Class_IntMajAuto::findAllBy(['order' => 'rang']) as $majauto) $this->_runOne($majauto); diff --git a/library/Class/Systeme/Report.php b/library/Class/Systeme/Report.php index adb13dd86acc502e5f024292103d0891c556f8c0..2a7ed1b54788beb98b4206fd713797f93655525a 100644 --- a/library/Class/Systeme/Report.php +++ b/library/Class/Systeme/Report.php @@ -67,6 +67,15 @@ class Class_Systeme_Report_Headers extends Class_Systeme_Report_Abstract { public function acceptVisitor($visitor) { $visitor->visitDatetime('creation_datetime', $this->_('Généré le'), $this->getCurrentTime()); $visitor->visitData('version', $this->_('Version'), BOKEH_RELEASE_NUMBER); + + $visitor->visitData('buid', + $this->_('Identifiant unique'), + (new Class_AdminVar_BUID())->getValue()); + + $visitor->visitData('database', + $this->_('Base de données'), + array_at('dbname', + Zend_Db_Table::getDefaultAdapter()->getConfig())); } } @@ -78,6 +87,7 @@ class Class_Systeme_Report_Portal extends Class_Systeme_Report_Abstract { $visitor->visitData('url', $this->_('URL principale'), Class_Url::siteUrl()); $visitor->visitData('label', $this->_('Libellé principal'), Class_Profil::getPortail()->getLibelle()); $visitor->visitDataArray('skins', $this->_('Thèmes utilisés'), $this->_profilSkins()); + $visitor->visitDataArray('tags', $this->_('Tags'), $this->_fetchTags()); } @@ -89,6 +99,19 @@ class Class_Systeme_Report_Portal extends Class_Systeme_Report_Abstract { ->getArrayCopy())); } + + protected function _fetchTags() { + $tags = (string)Class_AdminVar::get('STATUS_REPORT_TAGS'); + if (defined('STATUS_REPORT_TAGS')) + $tags = (string)constant('STATUS_REPORT_TAGS') . ',' . $tags; + + return + array_values( + array_filter( + array_map('trim', + preg_split( + '/[^0-9a-zA-Z_]+/', $tags)))); + } } diff --git a/library/Class/Systeme/Report/Cosmogramme.php b/library/Class/Systeme/Report/Cosmogramme.php index 227a2ae0e13784b5be1f55d9bfae9c3c28f960c7..3280ada049abc67a9b9449dd741276334cb0e75f 100644 --- a/library/Class/Systeme/Report/Cosmogramme.php +++ b/library/Class/Systeme/Report/Cosmogramme.php @@ -37,7 +37,7 @@ class Class_Systeme_Report_Cosmogramme extends Class_Systeme_Report_Abstract { $visitor->visitDatetime('last_run', $this->_('Dernier traitement d\'intégration effectué le'), - $this->_date_integration); + strtotime($this->_date_integration)); return $this; } diff --git a/library/Class/Systeme/Report/Publication.php b/library/Class/Systeme/Report/Publication.php new file mode 100644 index 0000000000000000000000000000000000000000..942f95f6ba4b1b1ffb55de5d24f0e8324442cf1a --- /dev/null +++ b/library/Class/Systeme/Report/Publication.php @@ -0,0 +1,47 @@ +<?php +/** + * Copyright (c) 2012-2014, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +class Class_Systeme_Report_Publication extends Class_WebService_Abstract { + use Trait_Translator; + + public function push($log) { + if (!$url = Class_AdminVar::getValueOrDefault('STATUS_REPORT_PUSH_URL')) + return $this; + + if (!(new ZendAfi_Validate_Url())->isValid($url)) + return $this; + + $log->addInfo($this->_('Publication du rapport système')); + + $json = (new ZendAfi_View_Helper_Status_Json())->status_Json(); + + try { + $this->getHttpClient()->postData($url, + ['report' => $json]); + } catch (Exception $e) { + $log->addError($this->_('Echec de la publication du rapport sur %s (%s)', + $url, + $e->getMessage())); + } + } +} +?> \ No newline at end of file diff --git a/library/Class/WebService/Abstract.php b/library/Class/WebService/Abstract.php index 738f17f8f55a301db776622019a16fb111b60d65..3ee8d4a09056e36e4661b5342bb1f015dab6a80b 100644 --- a/library/Class/WebService/Abstract.php +++ b/library/Class/WebService/Abstract.php @@ -22,7 +22,6 @@ class Class_WebService_Abstract { use Trait_Timesource; - protected $_message; protected static $_http_client; public static function setDefaultHttpClient($http_client) { @@ -44,17 +43,6 @@ class Class_WebService_Abstract { } - - public function setMessage($message) { - $this->_message=$message; - } - - - public function getMessage() { - return $this->_message; - } - - public function httpGet($url) { return $this->getHttpClient()->open_url($url); } diff --git a/scripts/emacs/phafi-mode.el b/scripts/emacs/phafi-mode.el index bbda7c8080e4d22c31b781824592e77d7a34783a..fffee7378d308e2bb58ebc5f8b1af6a48e30fbd5 100644 --- a/scripts/emacs/phafi-mode.el +++ b/scripts/emacs/phafi-mode.el @@ -656,7 +656,8 @@ "update variables set valeur='admin' where clef='admin_login';" "update variables set valeur='admin' where clef='admin_pwd';" "update mysql.proc set definer='root@localhost';" - "update bib_admin_var set valeur='1' where clef='ENABLE_COLLABORATIVE_BROWSING';" + "update bib_admin_var set valeur='0' where clef='ENABLE_COLLABORATIVE_BROWSING';" + "update bib_admin_var set valeur='no' where clef='STATUS_REPORT_PUSH_URL';" "drop trigger datemaj_notices_update;") mysql-connection-info) diff --git a/tests/library/Class/Cosmogramme/Integration/PhaseEndProcessTest.php b/tests/library/Class/Cosmogramme/Integration/PhaseEndProcessTest.php new file mode 100644 index 0000000000000000000000000000000000000000..d3d375eb2f9794f55f8770cc23ffc2e2727f8bc8 --- /dev/null +++ b/tests/library/Class/Cosmogramme/Integration/PhaseEndProcessTest.php @@ -0,0 +1,106 @@ +<?php +/** + * Copyright (c) 2012-2014, Agence Française Informatique (AFI). All rights reserved. + * + * BOKEH is free software; you can redistribute it and/or modify + * it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by + * the Free Software Foundation. + * + * There are special exceptions to the terms and conditions of the AGPL as it + * is applied to this software (see README file). + * + * BOKEH is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU AFFERO GENERAL PUBLIC LICENSE for more details. + * + * You should have received a copy of the GNU AFFERO GENERAL PUBLIC LICENSE + * along with BOKEH; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + */ + + +class PhaseEndProcessTest extends Class_Cosmogramme_Integration_PhaseTestCase { + protected $_http_client; + + protected function _getPreviousPhase() { + return (new Class_Cosmogramme_Integration_Phase(21))->beCron(); + } + + + public function setUp() { + parent::setUp(); + + $this->_http_client = $this->mock() + ->whenCalled('postData') + ->answers(''); + + Class_Systeme_Report_Publication::setDefaultHttpClient($this->_http_client); + $this->fixture('Class_Profil', ['id' => 1, 'libelle' => 'My Bokeh']); + } + + + public function tearDown() { + Class_Systeme_Report_Publication::resetHttpClient(); + parent::tearDown(); + } + + + /** @test */ + public function reportShouldBePushedToPola() { + $this->_phase = $this->_buildPhase('EndProcess')->run(); + $this->assertEquals('http://pola.afi-sa.net/smile.php', + $this->_http_client->getFirstAttributeForLastCallOn('postData')); + } + + + /** @test */ + public function logShouldContainsReportPublished() { + $this->_phase = $this->_buildPhase('EndProcess')->run(); + $this->assertLogContains('Publication du rapport système'); + } + + + /** @test */ + public function pushedRequestToPolaShouldIncludeReport() { + $this->_phase = $this->_buildPhase('EndProcess')->run(); + $report = $this->_http_client->getAttributesForLastCallOn('postData')[1]['report']; + $this->assertEquals('My Bokeh', json_decode($report, true)['portal']['label']); + } + + + /** @test */ + public function withNoPushUrlShouldNotPushReport() { + Class_AdminVar::set('STATUS_REPORT_PUSH_URL', '0'); + $this->_phase = $this->_buildPhase('EndProcess')->run(); + $this->assertFalse($this->_http_client->methodHasBeenCalled('postData')); + } + + + /** @test */ + public function withInvalidPushUrlShouldNotPushReport() { + Class_AdminVar::set('STATUS_REPORT_PUSH_URL', 'no'); + $this->_phase = $this->_buildPhase('EndProcess')->run(); + $this->assertFalse($this->_http_client->methodHasBeenCalled('postData')); + } + + + /** @test */ + public function withInvalidPushUrlLogShouldNotContainsReportPublished() { + Class_AdminVar::set('STATUS_REPORT_PUSH_URL', 'no'); + $this->_phase = $this->_buildPhase('EndProcess')->run(); + $this->assertNotLogContains('Publication du rapport système'); + } + + + /** @test */ + public function withExceptionShouldNotPushReport() { + $this->_http_client + ->whenCalled('postData') + ->willDo(function() { throw new RunTimeException('no more paper'); }); + + $this->_phase = $this->_buildPhase('EndProcess')->run(); + $this->assertLogContains('Echec de la publication du rapport sur http://pola.afi-sa.net/smile.php (no more paper)'); + } +} +?> \ No newline at end of file diff --git a/tests/library/Class/Cosmogramme/Integration/PhasePrepareIntegrationsTest.php b/tests/library/Class/Cosmogramme/Integration/PhasePrepareIntegrationsTest.php index 79c815e03f47ae55a599dc3c83ef79d9ce91cb27..07d6aa04f33318a58e43e8eeb64029a840c14f46 100644 --- a/tests/library/Class/Cosmogramme/Integration/PhasePrepareIntegrationsTest.php +++ b/tests/library/Class/Cosmogramme/Integration/PhasePrepareIntegrationsTest.php @@ -1,4 +1,4 @@ -<?php +~<?php /** * Copyright (c) 2012-2014, Agence Française Informatique (AFI). All rights reserved. * @@ -20,6 +20,8 @@ */ abstract class PhasePrepareIntegrationsWithOAITestCase extends Class_Cosmogramme_Integration_PhaseTestCase { + protected $_http_client; + public function setUp() { parent::setUp(); @@ -52,6 +54,16 @@ abstract class PhasePrepareIntegrationsWithOAITestCase extends Class_Cosmogramme ->answers(true) ->beStrict(); + $this->_http_client = $this->mock() + ->whenCalled('postData') + ->answers(''); + + Class_AdminVar::set('STATUS_REPORT_PUSH_URL', + 'http://pola.roid.fr'); + + Class_Systeme_Report_Publication::setDefaultHttpClient($this->_http_client); + $this->fixture('Class_Profil', ['id' => 1, 'libelle' => 'My Bokeh']); + Class_Cosmogramme_Integration_PhasePrepareIntegrations::setFileSystem($file_system); Class_Cosmogramme_Integration_PhasePrepareIntegrations::setTimeSource(new TimeSourceForTest('2015-03-26 14:00:00')); @@ -59,6 +71,12 @@ abstract class PhasePrepareIntegrationsWithOAITestCase extends Class_Cosmogramme } + public function tearDown() { + Class_Systeme_Report_Publication::resetHttpClient(); + parent::tearDown(); + } + + protected function _prepareFixtures() { $this->fixture('Class_CosmoVar', ['id' => 'ID_upload', 'valeur' => 1178]); @@ -213,6 +231,20 @@ class PhasePrepareIntegrationsWithOAITest extends PhasePrepareIntegrationsWithOA Class_CosmoVar::setValueOf('integration_path', ''); $this->_phase = $this->_buildPhase('PrepareIntegrations')->run(); } + + + /** @test */ + public function reportShouldBePushedToPola() { + $this->assertEquals('http://pola.roid.fr', + $this->_http_client->getFirstAttributeForLastCallOn('postData')); + } + + + /** @test */ + public function pushedRequestToPolaShouldIncludeReport() { + $report = $this->_http_client->getAttributesForLastCallOn('postData')[1]['report']; + $this->assertEquals('My Bokeh', json_decode($report, true)['portal']['label']); + } } diff --git a/tests/library/ZendAfi/View/Helper/Status/HtmlTest.php b/tests/library/ZendAfi/View/Helper/Status/HtmlTest.php index 8f906a85ccda41724e0b8252f1ebc55f2147c905..04a18315027eb4d81f33962e18b61b3aa544c682 100644 --- a/tests/library/ZendAfi/View/Helper/Status/HtmlTest.php +++ b/tests/library/ZendAfi/View/Helper/Status/HtmlTest.php @@ -27,6 +27,7 @@ class ZendAfi_View_Helper_Status_HtmlTest extends ZendAfi_View_Helper_Status_Tes public function setUp() { parent::setUp(); + Class_AdminVar::set('BUID', '2345abc'); $this->_html = utf8_decode($this->_helper->status_Html()); } @@ -53,6 +54,14 @@ class ZendAfi_View_Helper_Status_HtmlTest extends ZendAfi_View_Helper_Status_Tes } + /** @test */ + public function uniqueIdentifierShouldBe2345abc() { + $this->assertXPathContentContains($this->_html, + '//section/dl/dd[preceding-sibling::dt[text()="Identifiant unique"]]', + '2345abc'); + } + + /** @test */ public function portalUrlShouldBeLibraryAnnecyDotFr() { $this->assertXPathContentContains($this->_html, diff --git a/tests/library/ZendAfi/View/Helper/Status/JsonTest.php b/tests/library/ZendAfi/View/Helper/Status/JsonTest.php index 3297ae7d558af001572331f5c7727d5836bdd9eb..793530891873be1bbfaf5c55817f6efbd52423cd 100644 --- a/tests/library/ZendAfi/View/Helper/Status/JsonTest.php +++ b/tests/library/ZendAfi/View/Helper/Status/JsonTest.php @@ -44,12 +44,34 @@ class ZendAfi_View_Helper_Status_JsonTest extends ZendAfi_View_Helper_Status_Tes } + /** @test */ + public function portalTagsShouldContainsTestingIgnoreInProdAndDedicatedServer() { + $this->assertEquals(['TESTING', 'IGNORE', 'IN_PROD', 'DEDICATED_SERVER'], + $this->_report['portal']['tags']); + } + + /** @test */ public function headersVersionShouldBeCurrentVersion() { $this->assertEquals(BOKEH_RELEASE_NUMBER, $this->_report['headers']['version']); } + /** @test */ + public function headersBUIDShouldBeGenerated() { + $this->assertNotEmpty($this->_report['headers']['buid']); + $this->assertEquals(Class_AdminVar::get('BUID'), + $this->_report['headers']['buid']); + } + + + /** @test */ + public function headersShouldContainsDatabaseName() { + $this->assertEquals(Zend_Db_Table::getDefaultAdapter()->getConfig()['dbname'], + $this->_report['headers']['database']); + } + + /** @test */ public function portalLabelShouldBeC2APortal() { $this->assertEquals('C2A portal', $this->_report['portal']['label']); diff --git a/tests/library/ZendAfi/View/Helper/Status/TestCase.php b/tests/library/ZendAfi/View/Helper/Status/TestCase.php index 3905d8f7745d8011921ec81c09fe00a92467d50f..eb1f5ab1ce3289c10627afd7015c6ae01e6b6b5c 100644 --- a/tests/library/ZendAfi/View/Helper/Status/TestCase.php +++ b/tests/library/ZendAfi/View/Helper/Status/TestCase.php @@ -142,6 +142,12 @@ abstract class ZendAfi_View_Helper_Status_TestCase extends ViewHelperTestCase { } + protected function _setupReportTags() { + defineConstant('STATUS_REPORT_TAGS', '@,TESTING IGNORE"'); + Class_AdminVar::set('STATUS_REPORT_TAGS', 'IN_PROD; DEDICATED_SERVER,'); + } + + protected function _setupBokeh() { Class_AdminVar::set('NOM_DOMAINE', 'library.annecy.fr'); $this @@ -150,7 +156,8 @@ abstract class ZendAfi_View_Helper_Status_TestCase extends ViewHelperTestCase { ->_setupRecords() ->_setupUsers() ->_setupILS() - ->_setupDigitalResources(); + ->_setupDigitalResources() + ->_setupReportTags(); } protected function _setupVars() {