From 2948f11f796f5c0e2226d271ca44dc0516356798 Mon Sep 17 00:00:00 2001
From: Patrick Barroca <pbarroca@afi-sa.fr>
Date: Thu, 2 Aug 2018 15:34:02 +0200
Subject: [PATCH] dev #72435 : can configure integration with authority file
 type

---
 .../cosmo/controllers/DataProfileControllerTest.php       | 8 ++++++--
 library/Class/IntProfilDonnees.php                        | 1 +
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/cosmogramme/cosmozend/tests/application/modules/cosmo/controllers/DataProfileControllerTest.php b/cosmogramme/cosmozend/tests/application/modules/cosmo/controllers/DataProfileControllerTest.php
index 66770949a42..c3b423de823 100644
--- a/cosmogramme/cosmozend/tests/application/modules/cosmo/controllers/DataProfileControllerTest.php
+++ b/cosmogramme/cosmozend/tests/application/modules/cosmo/controllers/DataProfileControllerTest.php
@@ -672,7 +672,6 @@ class Cosmo_DataProfileControllerPostEditFieldsTest extends Cosmo_DataProfileCon
 
 
 class Cosmo_DataProfileControllerAddActionTest extends Cosmo_DataProfileControllerTestCase {
-
   public function setUp() {
     parent::setUp();
     $this->dispatch('/cosmo/data-profile/add', true);
@@ -683,12 +682,17 @@ class Cosmo_DataProfileControllerAddActionTest extends Cosmo_DataProfileControll
   public function formShouldBePresent() {
     $this->assertXPath('//form');
   }
+
+
+  /** @test */
+  public function authorityTypeShouldBeAvailable() {
+    $this->assertXPath('//form//select[@id="type_fichier"]//option[@value="' . Class_IntProfilDonnees::FT_AUTHORITY . '"]');
+  }
 }
 
 
 
 class Cosmo_DataProfileControllerDeleteActionTest extends Cosmo_DataProfileControllerTestCase {
-
   public function setUp() {
     parent::setUp();
     $this->dispatch('/cosmo/data-profile/delete/id/56', true);
diff --git a/library/Class/IntProfilDonnees.php b/library/Class/IntProfilDonnees.php
index 47cfd3c3497..6acdeeb4327 100644
--- a/library/Class/IntProfilDonnees.php
+++ b/library/Class/IntProfilDonnees.php
@@ -57,6 +57,7 @@ class IntProfilDonneesLoader extends Storm_Model_Loader {
 
   public function getFileTypes() {
     return [Class_IntProfilDonnees::FT_RECORDS => $this->_('Notices'),
+            Class_IntProfilDonnees::FT_AUTHORITY => $this->_('Autorités'),
             Class_IntProfilDonnees::FT_PATRONS => $this->_('Abonnés'),
             Class_IntProfilDonnees::FT_LOANS => $this->_('Prêts'),
             Class_IntProfilDonnees::FT_HOLDS => $this->_('Réservations'),
-- 
GitLab