Commit 66d96249 authored by Ghislain Loas's avatar Ghislain Loas

dev #85748 add 8 Suricate Semantic features

parent cb63de83
Pipeline #6171 passed with stage
in 62 minutes and 24 seconds
- ticket #85748 : Administration : activation des fonctionnalités de la version 8.0 Suricate Semantic.
\ No newline at end of file
<?php
(new Class_Migration_BokehHeight)->run();
\ No newline at end of file
......@@ -262,9 +262,9 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
['name' => 'site_url', 'label' => $this->_('Url de recherche')] ]]]),
'NOM_DOMAINE' => Class_AdminVar_Meta::newDefault($this->_('Nom de domaine principal de l\'OPAC, ex: monopac.macommune.fr')),
'CUSTOM_SEARCH_FORM' => Class_AdminVar_Meta::newOnOff($this->_('Activer les formulaires de recherche configurables'))->bePrivate(),
'CUSTOM_SEARCH_FORM' => Class_AdminVar_Meta::newOnOff($this->_('Activer les formulaires de recherche configurables'))->enable(),
'ENABLE_SEARCH_MULTIPLE_RECORD_SELECTION' => Class_AdminVar_Meta::newOnOff($this->_('Activer la sélection multiple de notices dans le résultat de recherche')),
'AUTHOR_PAGE' => Class_AdminVar_Meta::newOnOff($this->_('Activer les fiches auteurs, tous les liens de recherche vers un auteur basculeront sur la fiche auteur')),
'AUTHOR_PAGE' => Class_AdminVar_Meta::newOnOff($this->_('Activer les fiches auteurs, tous les liens de recherche vers un auteur basculeront sur la fiche auteur'))->enable(),
];
}
......@@ -310,7 +310,7 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
'FORCE_HTTPS' => Class_AdminVar_Meta::newOnOff($this->_('Forcer l\'accès au site par le protocole HTTPS. Nécessite l\'installation et la configuration appropriée du serveur Web')),
'LOGIN_THROUGH_SIGB_ONLY' => Class_AdminVar_Meta::newOnOff($this->_('Les abonné.e.s peuvent se connecter uniquement via le webservice du SIGB.')
. '<br/>'
. $this->_('De plus, à la connexion, l\'enregistrement des mots de passes des abonnés est désactivé.'))->bePrivate(),
. $this->_('De plus, à la connexion, l\'enregistrement des mots de passes des abonnés est désactivé.')),
'OAUTH_ACCEPT_HTTP' => Class_AdminVar_Meta::newOnOff($this->_('Autoriser l\'accès aux API OAUTH via HTTP (non sécurisé - déconseillé)'), ['value' => 0]),
'NB_AFFICH_AVIS_PAR_AUTEUR' => Class_AdminVar_Meta::newDefault($this->_('Nombre d\'avis maximum à afficher par utilisateur.')),
'REGISTER_OK' => Class_AdminVar_Meta::newEncodedData($this->_('Texte visible par l\'internaute après son inscription.')),
......@@ -367,9 +367,9 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
'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(),
'FEATURES_TRACKING_ENABLE' => Class_AdminVar_Meta::newOnOff('Affiche les dernières modifications apportés au logiciel Bokeh', ['value' => 1]),
'INSPECTOR_GADGET_MARC_XML' => Class_AdminVar_Meta::newOnOff('Affiche le MARC XML de la notice dans Inspector Gadget'),
'INSPECTOR_GADGET_MARC_XML' => Class_AdminVar_Meta::newOnOff('Affiche le MARC XML de la notice dans Inspector Gadget')->enable(),
'BUSINESS_EMAIL' => Class_AdminVar_Meta::newDefault($this->_('Email utilisé pour les demandes d\'accompagnement de mise en place ou d\'utilisation des fonctionnalités du logiciel'), ['value' => 'cial-bib@afi-sa.fr'])->bePrivate(),
'CODIFICATION_BROWSER' => Class_AdminVar_Meta::newOnOff($this->_('Activer l\'outil de parcours des codifications')),
'CODIFICATION_BROWSER' => Class_AdminVar_Meta::newOnOff($this->_('Activer l\'outil de parcours des codifications'))->enable(),
'TEMPLATING' => Class_AdminVar_Meta::newOnOff('Active l\'accès au magasin de thèmes',
['value' => 0])->bePrivate(),
'GENERATION_SITE' => Class_AdminVar_Meta::newOnOff($this->_('Activation de la génération de site.')),
......@@ -992,6 +992,11 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
}
public function isAuthorPageEnabled() {
return Class_AdminVar::isModuleEnabled('AUTHOR_PAGE');
}
public function shouldKeepLastSigbRecord() {
return Class_AdminVar::isModuleEnabled('KEEP_LAST_SIGB_RECORD');
}
......
......@@ -161,6 +161,12 @@ class Class_AdminVar_Meta {
}
public function setValue($value) {
$this->_attributes['value'] = $value;
return $this;
}
public function bePrivate() {
$this->_attributes['role_level'] = ZendAfi_Acl_AdminControllerRoles::SUPER_ADMIN;
return $this;
......@@ -170,4 +176,12 @@ class Class_AdminVar_Meta {
public function isPrivate() {
return ZendAfi_Acl_AdminControllerRoles::SUPER_ADMIN == $this->getAttribute('role_level', null);
}
public function enable() {
if (! $this->isOnOff())
return $this;
return $this->setValue(1);
}
}
\ No newline at end of file
......@@ -115,7 +115,14 @@ class Class_CosmoVar extends Storm_Model_Abstract {
$_table_name = 'variables',
$_table_primary = 'clef',
$_loader_class = 'Class_CosmoVarLoader',
$_fixed_id = true;
$_fixed_id = true,
$_default_attribute_values = ['commentaire' => '',
'type_champ' => 0,
'liste' => '',
'groupe' => 0,
'ordre' => 0,
'verrou' => '',
'hidden' => 0];
public static function get($name) {
......
......@@ -57,7 +57,16 @@ class Class_Cosmogramme_Integration_PhasePseudoRecordAlbum extends Class_Cosmogr
protected function _summarize() {
Class_CosmoVar::setValueOf('date_maj_albums', $this->getCurrentDateTime());
if (!$model = Class_CosmoVar::find('date_maj_albums'))
$model = Class_CosmoVar::newInstance()
->setClef('date_maj_albums');
$model
->setValeur($this->getCurrentDateTime())
->setCommentaire($this->_('Dernière date de mise à jour des albums.'))
->setGroupe(6)
->save();
parent::_summarize();
}
}
......@@ -48,7 +48,7 @@ class IntBibLoader extends Storm_Model_Loader {
}
public function isSingleNanook($patrons_closure = null) {
public function isSingleNanook() {
return (new Class_IntBib_SingleNanook())->isSingle(Class_IntBib::findAll());
}
......@@ -58,6 +58,11 @@ class IntBibLoader extends Storm_Model_Loader {
}
public function isSingleKoha() {
return (new Class_IntBib_SingleKoha())->isSingle(Class_IntBib::findAll());
}
public function findAllNanookWithPreRegistration() {
$collection = new Storm_Model_Collection(Class_IntBib::findAll());
$combo = $collection
......@@ -109,6 +114,7 @@ class Class_IntBib extends Storm_Model_Abstract {
const SIGB_PERGAME = 1;
const SIGB_KOHA = 12;
const SIGB_NANOOK = 13;
const SIGB_ORPHEE = 3;
const TYPE = 'type';
const URL_SERVER = 'url_server';
......@@ -308,6 +314,11 @@ class Class_IntBib extends Storm_Model_Abstract {
}
public function isKoha() {
return static::SIGB_KOHA == $this->getSigb();
}
public function isCommKoha() {
return Class_IntBib::COM_KOHA == $this->getCommSigb();
}
......
<?php
/**
* Copyright (c) 2012-2019, 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_IntBib_SingleKoha extends Class_IntBib_SingleSigb {
protected function _isSigb($library) {
return $library->isKoha();
}
}
\ No newline at end of file
......@@ -20,42 +20,8 @@
*/
class Class_Intbib_SingleNanook {
protected $_server = null;
public function isSingle($models) {
if(!$models)
return false;
$this->_server = null;
foreach($models as $library) {
if (!$this->_isLibraryNanook($library))
return false;
}
return true;
}
public function isSinglePatrons($models) {
$aCollection = (new Storm_Model_Collection($models))
->select(function($model)
{
return $model->hasPatronImport();
});
return $this->isSingle($aCollection->getArrayCopy());
}
protected function _isLibraryNanook($library) {
if (!$library->isNanook())
return false;
if (null == $this->_server) {
$this->_server = $library->getUrlServer();
return true;
}
return $this->_server == $library->getUrlServer();
class Class_IntBib_SingleNanook extends Class_IntBib_SingleSigb {
protected function _isSigb($library) {
return $library->isNanook();
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2019, 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
*/
abstract class Class_IntBib_SingleSigb {
protected $_server = null;
public function isSingle($models) {
if(!$models)
return false;
$this->_server = null;
foreach($models as $library) {
if (!$this->_isSigbAndSameServer($library))
return false;
}
return true;
}
public function isSinglePatrons($models) {
$aCollection = (new Storm_Model_Collection($models))
->select(function($model)
{
return $model->hasPatronImport();
});
return $this->isSingle($aCollection->getArrayCopy());
}
protected function _isSigbAndSameServer($library) {
if (!$this->_isSigb($library))
return false;
if (null == $this->_server) {
$this->_server = $library->getUrlServer();
return true;
}
return $this->_server == $library->getUrlServer();
}
abstract protected function _isSigb($library);
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2019, 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_Migration_BokehHeight {
use Trait_Translator;
public function run() {
Class_AdminVar::set('CODIFICATION_BROWSER', 1);
Class_AdminVar::set('INSPECTOR_GADGET_MARC_XML', 1);
Class_AdminVar::set('CUSTOM_SEARCH_FORM', 1);
Class_AdminVar::set('AUTHOR_PAGE', 1);
$this
->_manageLoginThroughSigbOnly()
->_fixCosmoVarDateMajAlbums();
}
protected function _manageLoginThroughSigbOnly() {
if (Class_IntBib::isSingleNanook() || Class_IntBib::isSingleKoha())
Class_AdminVar::set('LOGIN_THROUGH_SIGB_ONLY', 1);
return $this;
}
protected function _fixCosmoVarDateMajAlbums() {
if (!$model = Class_CosmoVar::find('date_maj_albums'))
$model = Class_CosmoVar::newInstance()
->setClef('date_maj_albums');
$model
->setCommentaire($this->_('Dernière date de mise à jour des albums.'))
->setGroupe(6)
->save();
}
}
\ No newline at end of file
......@@ -59,8 +59,9 @@ class ZendAfi_View_Helper_AdvancedSearch extends ZendAfi_View_Helper_BaseHelper
protected function _renderDefaultAdvancedSearch() {
return $this->view->renderForm($this->_defaultAdvancedSearch(),
['append' => [$this->_clearFormButton()]]);
$form_id = 'advanced_form';
return $this->view->renderForm($this->_defaultAdvancedSearch($form_id),
['append' => [$this->_clearFormButton($form_id)]]);
}
......@@ -77,8 +78,8 @@ class ZendAfi_View_Helper_AdvancedSearch extends ZendAfi_View_Helper_BaseHelper
}
protected function _defaultAdvancedSearch() {
return $this->_populateForm((new ZendAfi_Form_AdvancedSearch)->loadDefaults());
protected function _defaultAdvancedSearch($form_id) {
return $this->_populateForm((new ZendAfi_Form_AdvancedSearch)->loadDefaults(), $form_id);
}
......
......@@ -525,7 +525,7 @@ abstract class DiMusicRechercheControllerTestCase extends AbstractControllerTest
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$this->_prepareFixtures();
$bridges = $this->fixture('Class_Album',
......
......@@ -3,7 +3,7 @@
# --
<?php
/**
* Copyright (c) 2012-2018, Agence Française Informatique (AFI). All rights reserved.
* Copyright (c) 2012-2019, 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
......@@ -28,4 +28,3 @@ class ${class_name} {
$0
}
}
?>
\ No newline at end of file
......@@ -103,6 +103,7 @@ abstract class AbonneControllerLoansHistoryNanookTestCase extends AbstractContro
class AbonneControllerLoansHistoryNanookIndexTest extends AbonneControllerLoansHistoryNanookTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$this->dispatch('/abonne/loans-history',true);
}
......
......@@ -276,6 +276,9 @@ class AbonneControllerPretsExportThreePretsTest extends AbonneControllerPretsLis
class AbonneControllerPretsListThreePretsTest extends AbonneControllerPretsListThreePretsTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$this->fixture('Class_CodifAuteur',
['id' => 565,
'libelle' => 'QUINROSE']);
......@@ -594,6 +597,7 @@ abstract class AbonneControllerPretsListReservationTestCase extends AbstractAbon
class AbonneControllerPretsListReservationTest extends AbonneControllerPretsListReservationTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$this->dispatch('/opac/abonne/reservations', true);
}
......@@ -641,7 +645,7 @@ class AbonneControllerPretsListReservationTest extends AbonneControllerPretsList
}
/** @test */
/** @test */
public function authorShouldBeRowlingAndLinkSearch() {
$this->assertXPathContentContains('//tbody/tr[1]//td//a[@href="/recherche/simple/code_rebond/A456/retour_abonne/reservations"]',
'JOANNE KATHLEEN ROWLING',
......
......@@ -172,7 +172,7 @@ class NoticeAjaxControllerNoticeSimilairesSouleymaneTest extends NoticeAjaxContr
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
Class_Notice::newInstanceWithId(18787,
['titres' => 'IRM SOULEY',
'auteurs' => 'MOI',
......
......@@ -304,6 +304,8 @@ class RechercheControllerViewNoticeWithPreferencesTest extends RechercheControll
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$time_source = new TimeSourceForTest('2013-12-27 09:00:00');
Class_Notice::setTimeSource($time_source);
......@@ -561,6 +563,7 @@ class RechercheControllerViewNoticeWithPreferencesTest extends RechercheControll
class RechercheControllerViewNoticeTest extends RechercheControllerNoticeTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$this->dispatch('recherche/viewnotice/id/345', true);
}
......@@ -572,16 +575,19 @@ class RechercheControllerViewNoticeTest extends RechercheControllerNoticeTestCas
$this->_response->getBody());
}
/** @test */
public function pageShouldContainsOnlyTwoH1() {
$this->assertXPathCount('//h1', 2, $this->_response->getBody());
}
/** @test */
public function pageShouldContainsH1WithTitleAndAuthor() {
$this->assertXPath('//h1//span[contains(text(), "Cinéma d\'animation")][following-sibling::span[text()="Bernard Génin"]]');
}
/** @test */
public function tagReseauSociauxShouldBePresent() {
$this->assertXPath('//div[@id="reseaux-sociaux"]');
......
......@@ -2455,4 +2455,13 @@ class UpgradeDB_364_Test extends UpgradeDBTestCase {
public function articlesCategoriesShouldBePresent() {
$this->assertColumn('newsletters', 'articles_categories_ids');
}
}
\ No newline at end of file
}
class UpgradeDB_365_Test extends UpgradeDBTestCase {
public function prepare() {}
/** @test */
public function placeholderForBokehHeightMigration() {}
}
......@@ -511,6 +511,9 @@ class PhasePseudoRecordAlbumValidInteractiveCallbackTest
/** @test */
public function dateMajAlbumsShouldBeUpdated() {
$this->assertEquals('2019-01-09 12:11:38', Class_CosmoVar::get('date_maj_albums'));
$date_maj = Class_CosmoVar::find('date_maj_albums');
$this->assertEquals('2019-01-09 12:11:38', $date_maj->getValeur());
$this->assertEquals(6, $date_maj->getGroupe());
$this->assertContains('Dernière date de mise à jour des albums.', $date_maj->getCommentaire());
}
}
\ No newline at end of file
<?php
/**
* Copyright (c) 2012-2019, 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_Migration_BokehHeightTest extends ModelTestCase {
/** @test */
public function codificationBrowserShouldBecomeEnabled() {
Class_AdminVar::set('CODIFICATION_BROWSER', 0);
(new Class_Migration_BokehHeight)->run();
$this->assertTrue(Class_AdminVar::isCodificationBrowserEnabled());
}
/** @test */
public function codificationBrowserDefaultShouldBeEnabled() {
$this->assertTrue(Class_AdminVar::isCodificationBrowserEnabled());
}
/** @test */
public function inspectorGadgetMarcXMLShouldBecomeEnabled() {
Class_AdminVar::set('INSPECTOR_GADGET_MARC_XML', 0);
(new Class_Migration_BokehHeight)->run();
$this->assertTrue(Class_AdminVar::isInspectorGadgetMarcXmlEnabled());
}
/** @test */
public function inspectorGadgetMarcXMLShouldBeEnabled() {
$this->assertTrue(Class_AdminVar::isInspectorGadgetMarcXmlEnabled());
}
/** @test */
public function customSearchFormShouldBecomeEnabled() {
Class_AdminVar::set('CUSTOM_SEARCH_FORM', 0);
(new Class_Migration_BokehHeight)->run();
$this->assertTrue(Class_AdminVar::isCustomSearchFormEnabled());
}
/** @test */
public function customSearchFormShouldBeEnabled() {
$this->assertTrue(Class_AdminVar::isCustomSearchFormEnabled());
}
/** @test */
public function authorPageShouldBecomeEnabled() {
Class_AdminVar::set('AUTHOR_PAGE', 0);
(new Class_Migration_BokehHeight)->run();
$this->assertTrue(Class_AdminVar::isAuthorPageEnabled());
}
/** @test */
public function authorPageShouldBeEnabled() {
$this->assertTrue(Class_AdminVar::isAuthorPageEnabled());
}
/** @test */
public function withSingleKohaLoginThroughSigbOnlyShouldBecomeEnabled() {
Class_AdminVar::set('LOGIN_THROUGH_SIGB_ONLY', 0);
$this->fixture('Class_Intbib',
['id' => 4,
'sigb' => Class_IntBib::SIGB_KOHA,
'comm_params' => ['url_serveur' => 'https://service.local']]);
(new Class_Migration_BokehHeight)->run();
$this->assertTrue(Class_AdminVar::isLoginThroughSigbOnlyEnabled());
}
/** @test */
public function withSingleNanookLoginThroughSigbOnlyShouldBecomeEnabled() {
Class_AdminVar::set('LOGIN_THROUGH_SIGB_ONLY', 0);
$this->fixture('Class_Intbib',
['id' => 4,
'sigb' => Class_IntBib::SIGB_NANOOK,
'comm_params' => ['url_serveur' => 'https://service.local']]);
(new Class_Migration_BokehHeight)->run();
$this->assertTrue(Class_AdminVar::isLoginThroughSigbOnlyEnabled());
}
/** @test */
public function withOrpheeLoginThroughSigbOnlyShouldRemainDisabled() {
Class_AdminVar::set('LOGIN_THROUGH_SIGB_ONLY', 0);
$this->fixture('Class_Intbib',
['id' => 4,
'sigb' => Class_IntBib::SIGB_ORPHEE,
'comm_params' => ['url_serveur' => 'https://service.local']]);
(new Class_Migration_BokehHeight)->run();
$this->assertFalse(Class_AdminVar::isLoginThroughSigbOnlyEnabled());
}
/** @test */
public function withBothNanookAndKohaLoginThroughSigbOnlyShouldRemainDisabled() {
Class_AdminVar::set('LOGIN_THROUGH_SIGB_ONLY', 0);
$this->fixture('Class_Intbib',
['id' => 4,
'sigb' => Class_IntBib::SIGB_NANOOK,
'comm_params' => ['url_serveur' => 'https://service-nanook.local']]);
$this->fixture('Class_Intbib',
['id' => 5,
'sigb' => Class_IntBib::SIGB_KOHA,
'comm_params' => ['url_serveur' => 'https://service-koha.local']]);
(new Class_Migration_BokehHeight)->run();
$this->assertFalse(Class_AdminVar::isLoginThroughSigbOnlyEnabled());
}
/** @test */
public function variableDateMajAlbumsShouldHaveGroup6() {
Class_CosmoVar::setValueOf('date_maj_albums', '');
(new Class_Migration_BokehHeight)->run();
$this->assertEquals(6, Class_CosmoVar::find('date_maj_albums')->getGroupe());
}
}
......@@ -27,6 +27,8 @@ class ZendAfi_View_Helper_AnchorAuthorSimpleTest extends ViewHelperTestCase {
public function setup() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$brisson = $this->fixture('Class_CodifAuteur',
['id' => 10,
'libelle' => 'Stéphanie BRISSON',
......
......@@ -29,6 +29,8 @@ class ZendAfi_View_Helper_SuggestsTest extends ViewHelperTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$this->fixture('Class_CodifAuteur',
['id' => 43,
'libelle' => 'Pomme d\'API']);
......@@ -112,5 +114,3 @@ class ZendAfi_View_Helper_SuggestsTest extends ViewHelperTestCase {
}
}
?>
\ No newline at end of file
......@@ -117,6 +117,8 @@ class AlbumAudioRecordViewNoticeTest extends AlbumAudioRecordTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$this->mock_sql = $this->mock()
->whenCalled('execute')->answers('')
->whenCalled('fetchOne')->answers(null)
......@@ -295,6 +297,7 @@ class AlbumAudioRecordViewMorceauxTest extends AlbumAudioRecordTestCase {
class AlbumAudioRecordViewDetailsTest extends AlbumAudioRecordTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('AUTHOR_PAGE', 0);
$this->dispatch('/opac/noticeajax/detail/id_notice/'.$this->_notice->getId(), true);
}
......
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