Commit a53faff2 authored by Ghislain Loas's avatar Ghislain Loas

dev #85637 : admin menu maintenance + doc links + filter redmine libraries

parent a8424963
Pipeline #6157 failed with stage
in 27 minutes and 25 seconds
- ticket #85637 : Administration : maintenance des entrées de menu gauche et ajout de liens vers la documentation.
\ No newline at end of file
......@@ -118,14 +118,14 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
if (null !== $this->all_vars)
return $this->all_vars;
return $this->all_vars=
return $this->all_vars =
[
'avis' => $this->_getCommentVars(),
'modo' => $this->_getModerationVars(),
'stat' => $this->_getStatVars(),
'global' => $this->_getGlobalVars(),
'cosmogramme' => $this->_getCosmogrammeVars(),
'catalogue' => $this->_getOAIVars(),
'catalogue' => $this->_getCatalogVars(),
'newsletter' => $this->_getNewsletterVars(),
'cms' => $this->_getCmsVars(),
'album' => $this->_getAlbumVars(),
......@@ -155,7 +155,10 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
'ALBUM_MEDIA_NO_AUTOINDEX_TITLE' => Class_AdminVar_Meta::newOnOff($this->_('Bibliothèque numérique: ne pas créer de zone 464 pour les médias dont le titre n\'est pas saisi')),
'BIBNUM' => Class_AdminVar_Meta::newOnOff($this->_('Activer ou désactiver la bibliothèque numérique')),
'SITO_IN_ALBUMS' => Class_AdminVar_Meta::newOnOff($this->_('Gérer la sitothèque dans la bibliothèque numérique, nécessite l\'activation de la bibliothèque numérique'))->bePrivate(),
'IMPORT_EAD' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'import EAD')),
'OAI_REPOSITORY' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'import de dépôts OAI')),
'OPDS' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'import de catalogues OPDS')),
'SITO_IN_ALBUMS' => Class_AdminVar_Meta::newOnOff($this->_('Gérer la sitothèque dans la bibliothèque numérique, nécessite l\'activation de la bibliothèque numérique')),
'NUMILOG_URL' => Class_AdminVar_Meta::newDefault($this->_('Paramétrage <a href="http://forge.afi-sa.fr/projects/opac3/wiki/Ressources_externes_enrichissements#Numilog">Numilog</a>'))->bePrivate(),
'NUMILOG_OAI_URL' => Class_AdminVar_Meta::newDefault($this->_('Paramétrage <a href="http://forge.afi-sa.fr/projects/opac3/wiki/Ressources_externes_enrichissements#Numilog">Numilog</a>'))->bePrivate(),
......@@ -283,7 +286,7 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
'WORKFLOW_TEXT_MAIL_ARTICLE_PENDING' => Class_AdminVar_Meta::newDefault($this->_('Contenu de l\'email de notification d\'article en attente de validation. Termes substitués: TITRE_ARTICLE, URL_ARTICLE, AUTHOR_ARTICLE, SAVED_BY_ARTICLE, STATUS_ARTICLE, NEXT_STATUS_ARTICLE')),
'WORKFLOW_TEXT_MAIL_ARTICLE_REFUSED' => Class_AdminVar_Meta::newDefault($this->_('Contenu de l\'email de notification de refus d\'un article à valider. Termes substitués: TITRE_ARTICLE, URL_ARTICLE, AUTHOR_ARTICLE, SAVED_BY_ARTICLE')),
'WORKFLOW_TEXT_MAIL_ARTICLE_VALIDATED' => Class_AdminVar_Meta::newDefault($this->_('Contenu de l\'email de notification de validation d\'un article. Termes substitués: TITRE_ARTICLE, URL_ARTICLE, AUTHOR_ARTICLE, SAVED_BY_ARTICLE')),
'CUSTOM_GENRE_ICON' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'interface de personnalisation des icones des genres')),
];
}
......@@ -368,7 +371,11 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
'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')),
'TEMPLATING' => Class_AdminVar_Meta::newOnOff('Active l\'accès au magasin de thèmes',
['value' => 0])->bePrivate()
['value' => 0])->bePrivate(),
'GENERATION_SITE' => Class_AdminVar_Meta::newOnOff($this->_('Activation de la génération de site.')),
'CUSTOM_FIELDS_REPORT' => Class_AdminVar_Meta::newOnOff($this->_('Activation des rapports statistiques sur les champs personnalisés')),
'WEBSERVICE_TEST' => Class_AdminVar_Meta::newOnOff($this->_('Activation des tests de webservices')),
'IMPORT_AVIS_OPAC2' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'import des avis de l\'opac2')),
];
}
......@@ -407,8 +414,9 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
}
protected function _getOAIVars() {
protected function _getCatalogVars() {
return [
'IMPORT_THESAURUS' => Class_AdminVar_Meta::newOnOff($this->_('Activation de l\'import de thesaurus')),
'OAI_SERVER' => Class_AdminVar_Meta::newOnOff($this->_('Activation du serveur OAI: permet le moissonnage des domaines par d\'autres logiciels via OAI')),
'OAI_REPOSITORY_NAME' => Class_AdminVar_Meta::newDefault($this->_('Contenu de la balise "repositoryName" dans la réponse au verb Identify, si vide sera [NOM DU SERVEUR] Oai repository')),
'OAI_ADMIN_EMAIL' => Class_AdminVar_Meta::newDefault($this->_('Contenu de la balise "adminEmail" dans la réponse au verb Identify, si vide sera tiré de la variable cosmogramme "mail_admin"')),];
......@@ -877,6 +885,51 @@ class Class_AdminVarLoader extends Storm_Model_Loader {
}
public static function isImportThesaurusEnabled() {
return Class_AdminVar::isModuleEnabled('IMPORT_THESAURUS');
}
public static function isImportEadEnabled() {
return Class_AdminVar::isModuleEnabled('IMPORT_EAD');
}
public static function isOaiRepositoryEnabled() {
return Class_AdminVar::isModuleEnabled('OAI_REPOSITORY');
}
public static function isOpdsEnabled() {
return Class_AdminVar::isModuleEnabled('OPDS');
}
public static function isCustomGenreIconEnabled() {
return Class_AdminVar::isModuleEnabled('CUSTOM_GENRE_ICON');
}
public static function isGenerationSiteEnabled() {
return Class_AdminVar::isModuleEnabled('GENERATION_SITE');
}
public static function isCustomFieldsReportEnabled() {
return Class_AdminVar::isModuleEnabled('CUSTOM_FIELDS_REPORT');
}
public static function isWebserviceTestEnabled() {
return Class_AdminVar::isModuleEnabled('WEBSERVICE_TEST');
}
public static function isImportAvisOpac2Enabled() {
return Class_AdminVar::isModuleEnabled('IMPORT_AVIS_OPAC2');
}
public function getBabelthequeId() {
$mathes = [];
if (preg_match('/bw_([^\.]+)\.js/', (string)Class_AdminVar::get('BABELTHEQUE_JS'), $matches))
......
......@@ -56,6 +56,13 @@ class BibLoader extends Storm_Model_Loader {
}
public function findAllRedmineEnabled() {
return (new Storm_Model_Collection(Class_Bib::findAllBy(['order' => 'libelle'])))
->select('isRedmineEnabled')
->getArrayCopy();
}
public function getUserFriendlyBibs() {
$all_bibs = Class_Bib::getLoader()->findAllBy(['order' => 'libelle']);
$bibs_as_array = [];
......@@ -732,6 +739,11 @@ class Class_Bib extends Storm_Model_Abstract {
}
public function isRedmineEnabled() {
return (bool)$this->getRedmineLoginOrKey();
}
public function isReceivedFile() {
if (!$this->_isFileInRequest('photo'))
return true;
......
......@@ -1815,8 +1815,8 @@ class Class_Users extends Storm_Model_Abstract {
public function getRedmineLibraries() {
if($this->getRoleLevel() >= ZendAfi_Acl_AdminControllerRoles::MODO_PORTAIL)
return Class_Bib::findAllBy(['order' => 'libelle']);
if ($this->getRoleLevel() >= ZendAfi_Acl_AdminControllerRoles::MODO_PORTAIL)
return Class_Bib::findAllRedmineEnabled();
return [$this->getRedmineLibrary()];
}
......
......@@ -50,8 +50,8 @@ class ZendAfi_Acl_AdminControllerGroup {
public function __construct() {
$this->_activated = ['activity' => Class_AdminVar::isActivityEnabled(),
'album' => Class_AdminVar::isBibNumEnabled(),
'oai' => Class_AdminVar::isBibNumEnabled(),
'ead' => Class_AdminVar::isBibNumEnabled(),
'oai' => Class_AdminVar::isBibNumEnabled() && Class_AdminVar::isOaiRepositoryEnabled(),
'opds' => Class_AdminVar::isBibNumEnabled() && Class_AdminVar::isOpdsEnabled(),
'harvest/arte-vod-browse' => Class_AdminVar::isArteVODEnabled(),
'harvest/vodeclic-browse' => Class_AdminVar::isVodeclicEnabled(),
'harvest/orphea-browse' => Class_AdminVar::isOrpheaEnabled(),
......@@ -61,11 +61,18 @@ class ZendAfi_Acl_AdminControllerGroup {
'harvest/soundcloud' => Class_AdminVar::isSoundCloudEnabled(),
'sito/create' => Class_AdminVar::isSitoInAlbums(),
'album/dilicom' => Class_AdminVar::isDilicomPNBEnabled(),
'album/import_ead' => Class_AdminVar::isImportEadEnabled(),
'premier-chapitre' => Class_AdminVar::isPremierChapitreEnabled(),
'i18n' => Class_AdminVar::isTranslationEnabled(),
'stat/matomo' => (new Class_AdminVar_Matomo())->isEnabled(),
'multimedia' => Class_AdminVar::isMultimediaEnabled(),
'search-form' => Class_AdminVar::isCustomSearchFormEnabled(),
'systeme/importthesaurus' => Class_AdminVar::isImportThesaurusEnabled(),
'systeme/generationsite' => Class_AdminVar::isGenerationSiteEnabled(),
'systeme/webservices' => Class_AdminVar::isWebserviceTestEnabled(),
'systeme/importavisopac2' => Class_AdminVar::isImportAvisOpac2Enabled(),
'profil/genres' => Class_AdminVar::isCustomGenreIconEnabled(),
'custom-fields-report' => Class_AdminVar::isCustomFieldsReportEnabled(),
];
$this->_activated = array_merge($this->_activated,
......
......@@ -90,6 +90,9 @@ class ZendAfi_Acl_AdminControllerRoles extends Zend_Acl {
$this->add(new Zend_Acl_Resource('print'));
$this->add(new Zend_Acl_Resource('external-agendas'));
$this->add(new Zend_Acl_Resource('systeme'));
$this->add(new Zend_Acl_Resource('systeme/webservices'));
$this->add(new Zend_Acl_Resource('systeme/phpinfo'));
$this->add(new Zend_Acl_Resource('custom-fields-report'));
$this->add(new Zend_Acl_Resource('batch'));
$this->add(new Zend_Acl_Resource('file-manager'));
$this->add(new Zend_Acl_Resource('url-manager'));
......@@ -191,6 +194,9 @@ class ZendAfi_Acl_AdminControllerRoles extends Zend_Acl {
$this->deny('modo_portail','systeme');
$this->deny('modo_portail','batch');
$this->deny('modo_portail','search-form');
$this->deny('modo_portail','custom-fields-report');
$this->deny('modo_portail','systeme/webservices');
$this->deny('modo_portail','systeme/phpinfo');
foreach($codifications as $controller)
$this->deny('modo_portail', $controller);
......
......@@ -32,8 +32,9 @@ class ZendAfi_View_Helper_Admin_ContentNav extends ZendAfi_View_Helper_BaseHelpe
$this->menuMiseEnPage(),
$this->menuStats(),
$this->menuPortail(),
$this->menuCatalogue(),
$this->menuSysteme(),
$this->menuCatalogue()];
];
return $this->_tag('div',
implode($content),
......@@ -67,6 +68,7 @@ class ZendAfi_View_Helper_Admin_ContentNav extends ZendAfi_View_Helper_BaseHelpe
['newsletters', $this->_("Lettres d'information"), '/admin/newsletter'],
['trainings', $this->_('Activités'), '/admin/activity'],
['places', $this->_('Lieux'), '/admin/lieu'],
['filebrowser', $this->_('Explorateur de fichiers'), '/admin/file-manager'],
]);
}
......@@ -140,24 +142,24 @@ class ZendAfi_View_Helper_Admin_ContentNav extends ZendAfi_View_Helper_BaseHelpe
['links', $this->_('Contrôle des URL'), '/admin/url-manager'],
['variables', $this->_('Variables'), '/admin/index/adminvar', [], $is_admin],
['webservice_tests', $this->_('Test des web-services'), '/admin/systeme/webservices',
[], $is_super_admin],
['webservice_tests', $this->_('Test des web-services'), '/admin/systeme/webservices'],
['sendmail_tests', $this->_('Test envoi mails'), '/admin/systeme/mailtest', [], $is_super_admin],
['php', $this->_('Informations système'), '/admin/systeme/phpinfo', [], $is_super_admin],
['image_cache', $this->_('Cache des images'), '/admin/systeme/cacheimages', [], $is_admin],
['migrate_comments', $this->_('Import avis opac2'), '/admin/systeme/importavisopac2',
[], $is_super_admin],
[],
function ($user) use ($is_super_admin) {
return $is_super_admin($user) && Class_AdminVar::isImportAvisOpac2Enabled();
}],
['portal_init', $this->_('Génération du site'), '/admin/systeme/generationsite',
[], function($user) { return defined('DEVELOPMENT') && $user->isAdmin();}],
['portal_init', $this->_('Génération du site'), '/admin/systeme/generationsite'],
['filebrowser', $this->_('Explorateur de fichiers'), '/admin/file-manager'],
['search_form', $this->_('Formulaires de recherche'), '/admin/search-form'],
['customfields', $this->_('Champs personnalisés'), '/admin/custom-fields/index', [], $is_admin],
['customreports', $this->_('Rapports statistiques'), '/admin/custom-fields-report', [], $is_admin]
['customreports', $this->_('Rapports statistiques'), '/admin/custom-fields-report']
]);
}
......@@ -168,12 +170,8 @@ class ZendAfi_View_Helper_Admin_ContentNav extends ZendAfi_View_Helper_BaseHelpe
[["doctypes", $this->_("Types de documents"), "/admin/type-docs",
[], function($user) { return $user->isAdmin(); }],
["thesaurus_init", $this->_("Import Thesaurus"), "/admin/systeme/importthesaurus",
[], function($user) { return defined('DEVELOPMENT') && $user->isAdmin();}],
["thesaurus_edit",
$this->_("Parcourir les codifications"), "/admin/codification-browser",
[]]
["thesaurus_init", $this->_("Import Thesaurus"), "/admin/systeme/importthesaurus"],
["thesaurus_edit", $this->_("Parcourir les codifications"), "/admin/codification-browser"]
]);
}
......
......@@ -76,7 +76,8 @@ class ZendAfi_View_Helper_Admin_HelpLinkBokehWiki {
'library' => 'Afficher_les_horaires_d\'ouverture'],
'ouvertures' => ['index' => 'Ouvertures_des_bibliothèques'],
'bibnum' => ['index' => 'Connecteurs'],
'album' => ['index' => 'Collections'],
'album' => ['index' => 'Collections',
'add-website' => 'Sitothèque_ressource_numérique'],
'catalogue' => ['index' => 'Domaines'],
'cms' => ['index' => 'Articles_-_Créer,_rédiger_et_ordonner'],
'custom-fields' => ['index' => 'Gestion_des_champs_personnalisés'],
......@@ -107,7 +108,15 @@ class ZendAfi_View_Helper_Admin_HelpLinkBokehWiki {
'stat' => ['matomo' => 'Matomo'],
'print' => ['index' => 'Imprimer_un_résultat_de_recherche,_une_notice_ou_des_articles'],
'file-manager' => ['index' => 'Explorateur_de_fichiers'],
'url-manager' => ['index' => 'Gestion_des_URL']
'url-manager' => ['index' => 'Gestion_des_URL'],
'search-form' => ['index' => 'Personnalisation_de_la_recherche_avancée'],
'sito' => ['index' => 'Indexation_des_sitothèques'],
'external-agendas' => ['index' => 'Agendas_Externes'],
'lieu' => ['index' => 'Modifier_un_Lieu'],
'users' => ['index' => 'Gestion_des_utilisateurs'],
'codification-browser' => ['index' => 'Explorateur_de_codifications'],
'batch' => ['index' => 'Batchs,_tâches_planifiées'],
'feature' => ['index' => 'Nouvelles_fonctionnalités'],
];
......
......@@ -2646,6 +2646,9 @@ class Admin_AlbumControllerPreviewAlbumBibleSouvignyPostTest extends Admin_Album
class Admin_AlbumControllerImportEADTest extends Admin_AlbumControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('IMPORT_EAD', 1);
$this->dispatch('/admin/album/import_ead');
}
......
......@@ -25,6 +25,7 @@ class CustomFieldsReportControllerAddTest extends AbstractControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('CUSTOM_FIELDS_REPORT', 1);
$this->dispatch('/admin/custom-fields-report/add', true);
}
......@@ -67,6 +68,8 @@ class CustomFieldsReportControllerEditTest extends AbstractControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('CUSTOM_FIELDS_REPORT', 1);
$this->fixture('Class_Report', [
'id' => 2,
'label' => 'Report',
......@@ -90,6 +93,9 @@ class CustomFieldsReportControllerGenerateTest extends AbstractControllerTestCas
public function setUp() {
parent::setUp();
Class_AdminVar::set('CUSTOM_FIELDS_REPORT', 1);
$this->fixture('Class_Report', [
'id' => 42,
'label' => '',
......@@ -108,5 +114,4 @@ class CustomFieldsReportControllerGenerateTest extends AbstractControllerTestCas
public function customFieldsJsShouldBePresent() {
$this->assertXPath('//script[contains(@src, "custom-fields/custom_fields.js")]');
}
}
?>
\ No newline at end of file
}
\ No newline at end of file
......@@ -48,6 +48,9 @@ abstract class Admin_OaiControllerTestCase extends Admin_AbstractControllerTestC
class Admin_OaiControllerIndexActionTest extends Admin_OaiControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('OAI_REPOSITORY', 1);
$this->dispatch('/admin/oai');
}
......@@ -91,6 +94,7 @@ class Admin_OaiControllerIndexActionTest extends Admin_OaiControllerTestCase {
class Admin_OaiControllerAddActionTest extends Admin_OaiControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('OAI_REPOSITORY', 1);
$this->dispatch('/admin/oai/add');
}
......@@ -107,6 +111,7 @@ class Admin_OaiControllerAddActionTest extends Admin_OaiControllerTestCase {
class Admin_OaiControllerEditActionTest extends Admin_OaiControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('OAI_REPOSITORY', 1);
$this->dispatch('/admin/oai/edit/id/4');
}
......@@ -123,6 +128,7 @@ class Admin_OaiControllerEditActionTest extends Admin_OaiControllerTestCase {
class Admin_OaiControllerBrowseGallicaActionTest extends Admin_OaiControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('OAI_REPOSITORY', 1);
$web_client = Storm_Test_ObjectWrapper::mock();
Class_WebService_OAI::setDefaultHttpClient($web_client);
......@@ -155,6 +161,9 @@ class Admin_OaiControllerImportIsaacAsimovFoundationTest extends Admin_OaiContro
public function setUp() {
parent::setUp();
Class_AdminVar::set('OAI_REPOSITORY', 1);
$foundation = Class_NoticeOAI::getLoader()
->newInstanceWithId(23)
->setData(serialize(array('titre' => 'Prelude to foundation',
......@@ -227,6 +236,7 @@ class Admin_OaiControllerImportIsaacAsimovFoundationTest extends Admin_OaiContro
class Admin_OaiControllerSearchAsimovActionTest extends Admin_OaiControllerTestCase {
/** @test */
public function pageShouldRedirectToOaiIndexWithExpressionRecherche() {
Class_AdminVar::set('OAI_REPOSITORY', 1);
$this->dispatch('/admin/oai/search?expression=asimov', true);
$this->assertRedirectTo('/admin/oai/index/expression/asimov');
}
......@@ -238,6 +248,7 @@ class Admin_OaiControllerSearchAsimovActionTest extends Admin_OaiControllerTestC
abstract class Admin_OaiControllerSearchActionTestCase extends Admin_OaiControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('OAI_REPOSITORY', 1);
$this->mock_sql = Storm_Test_ObjectWrapper::on(Zend_Registry::get('sql'));
Zend_Registry::set('sql', $this->mock_sql);
}
......@@ -307,8 +318,4 @@ class Admin_OaiControllerIndexSearchInsignifantWordActionTest extends Admin_OaiC
public function pageShouldContainsPasAssezDeMotsSignifications() {
$this->assertXPathContentContains('//div[@class="error"]', "Il n'y aucun mot assez significatif pour la recherche");
}
}
?>
\ No newline at end of file
}
\ No newline at end of file
......@@ -24,6 +24,9 @@ abstract class Admin_OpdsControllerTestCase extends Admin_AbstractControllerTest
public function setUp() {
parent::setUp();
Class_AdminVar::set('OPDS', 1);
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_OpdsCatalog')
->whenCalled('findAllBy')
->with(array('order' => 'libelle'))
......@@ -59,6 +62,7 @@ class Admin_OpdsControllerWithReferentActionTest extends Admin_AbstractControlle
public function setUp() {
parent::setUp();
Class_AdminVar::set('OPDS', 1);
Storm_Test_ObjectWrapper::onLoaderOfModel('Class_Users')
->whenCalled('getIdentity')
->answers($user_referent=Class_Users::getLoader()->newInstanceWithId(2)
......@@ -945,5 +949,4 @@ class Admin_OpdsControllerBrowseFeedbooksTestCase extends Admin_OpdsControllerTe
$album = Class_Album::getLoader()->getFirstAttributeForLastCallOn('save');
$this->assertEquals('In his extraordinary debut novel of psychological suspense, Thomas OCallaghan proves himself a worthy successor to Thomas Harris as he introduces one of the most compelling and terrifying serial killers since Hannibal Lecter in a book where every...', $album->getDescription());
}
}
?>
\ No newline at end of file
}
\ No newline at end of file
......@@ -27,6 +27,8 @@ abstract class SystemeControllerOpac2ImportTestCase
parent::setUp();
Storm_Model_Loader::defaultToVolatile();
Class_AdminVar::set('IMPORT_AVIS_OPAC2', 1);
$this->fixture('Class_AdminVar',
['id' => 'AVIS_MAX_SAISIE',
'valeur' => '1000000']);
......
......@@ -21,6 +21,9 @@
class SystemeControllerWebServicesIndexActionTest extends Admin_AbstractControllerTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('WEBSERVICE_TEST', 1);
$this->dispatch('admin/systeme/webservices');
}
......@@ -48,6 +51,7 @@ class SystemeControllerWebServicesActionTest extends Admin_AbstractControllerTes
* @test
*/
public function webServiceFnacGetResumeShouldWork() {
Class_AdminVar::set('WEBSERVICE_TEST', 1);
$this->dispatch('/admin/systeme/webservices/id_service/Fnac/id_fonction/1');
$this->assertXPathContentContains('//pre[@class="resultat"]',
'Un campus prestigieux figé sous la neige',
......@@ -62,11 +66,10 @@ class SystemeControllerWebServicesActionTest extends Admin_AbstractControllerTes
* @test
*/
public function webServicePremiereGetResumeShouldWork() {
Class_AdminVar::set('WEBSERVICE_TEST', 1);
$this->dispatch('/admin/systeme/webservices/id_service/Premiere/id_fonction/1', true);
$this->assertXPathContentContains('//pre[@class="resultat"]',
'Jake Sully est un ancien marine', $this->_response->getBody());
}
}
?>
\ No newline at end of file
}
\ 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