From 2238e8e6e4e27e5eae9059c83e39ed66fbd94869 Mon Sep 17 00:00:00 2001 From: Fabrice Gangler <fabrice.gangler@adullact.org> Date: Wed, 26 Mar 2025 14:13:40 +0100 Subject: [PATCH] test(fixture): add logo files (organization + software) --- .../DataFixtures/AppOrganizationFixtures.php | 143 +++++++++++++++++- .../src/DataFixtures/AppSoftwareFixtures.php | 7 +- 2 files changed, 143 insertions(+), 7 deletions(-) diff --git a/webapp/src/DataFixtures/AppOrganizationFixtures.php b/webapp/src/DataFixtures/AppOrganizationFixtures.php index 95ba3b0..af0223e 100644 --- a/webapp/src/DataFixtures/AppOrganizationFixtures.php +++ b/webapp/src/DataFixtures/AppOrganizationFixtures.php @@ -42,31 +42,159 @@ class AppOrganizationFixtures extends Fixture 'name' => "ADULLACT", 'slug' => 'adullact', 'website' => 'https://adullact.org', - 'oldComptoirId' => 999, + 'logo' => 'logo_adullact_transparent.png', + 'oldComptoirId' => 3, 'description' => [ - 'fr' => "Association **des** ...\n" - . "- logiciel libre\n- numrérique libre", + 'fr' => "ADULLACT a pour objectifs de soutenir et coordonner l'action + des **Administrations** et **Collectivités** territoriales + dans le but de promouvoir, développer et maintenir un patrimoine + de **logiciels libres** utiles aux missions de service public.", 'en' => 'No **profit** organization...', ], ], 2 => [ - 'id' => 2, // must be identical to array key + 'id' => 2, // must be identical to array key + 'createdAt' => '2019-02-17 22:31:24', + 'updatedAt' => '2024-09-22 15:40:06', + 'type' => 'no_profit', + 'name' => "Adico", + 'slug' => 'adico', + 'website' => 'https://www.adico.fr', + 'logo' => 'RVB_LogoAdico_HD_baseline_vect_couleur+trans.png', + 'oldComptoirId' => 1026, + ], + 3 => [ + 'id' => 3, // must be identical to array key + 'createdAt' => '2025-01-12 10:07:24', + 'updatedAt' => '2025-03-25 13:25:02', + 'type' => 'no_profit', + 'name' => "Association des Maires de Haute-Savoie", + 'slug' => 'association-des-maires-de-haute-savoie', + 'website' => 'https://www.maires74.asso.fr', + 'logo' => 'adm74.png', + ], + 4 => [ + 'id' => 4, // must be identical to array key + 'createdAt' => '2025-01-12 10:07:24', + 'updatedAt' => '2025-03-25 13:25:02', + 'type' => 'no_profit', + 'name' => "ASSODEV-MARSNET", + 'slug' => 'assodev-marsnet', + 'website' => 'https://www.marsnet.org', + 'logo' => 'logo_assodev-marsnet_150.png', + 'oldComptoirId' => 237, + 'description' => [ + 'fr' => "ASSODEV-MARSNET est une structure d'accompagnement +et de services numériques libres pour les associations basée à Marseille : +- Conseil, +- Expertise et Développement, +- Formation Professionnelle, +- Services Internet, +- Services en ligne , +- Hébergement (sites, mails, listes, cloud,...). + +L'association est organisme de formation et membre co-fondateur du collectif **CHATONS**. +Créée en 2001, l'association est constituée de plus de **200 associations** et bénévoles de la Région PACA. ", + ], + ], + 5 => [ + 'id' => 5, // must be identical to array key + 'createdAt' => '2025-01-12 10:07:24', + 'updatedAt' => '2025-03-25 13:25:02', + 'type' => 'no_profit', + 'name' => "La Quadrature du Net", + 'slug' => 'la-quadrature-du-net', + 'website' => 'https://www.laquadrature.net', + 'logo' => 'la-quadrature-du-net.png', + ], + 6 => [ + 'id' => 6, // must be identical to array key 'createdAt' => '2022-06-19 13:31:24', 'updatedAt' => '2022-07-25 14:22:05', 'type' => 'public_sector', 'name' => "Mairie d'Abbeville", 'slug' => 'mairie-d-abbeville', + 'logo' => 'abbeville.jpeg', + 'oldComptoirId' => 1078, ], - 3 => [ - 'id' => 3, // must be identical to array key + 7 => [ + 'id' => 7, // must be identical to array key 'createdAt' => '2023-06-19 13:31:24', 'updatedAt' => '2023-07-25 14:22:05', 'type' => 'public_sector', 'name' => "Ville Montpellier (34)", 'slug' => 'ville-montpellier-34', 'website' => 'https://www.montpellier.fr', + 'logo' => 'User_Logo_mairieMontpellier.png', 'oldComptoirId' => 17, ], + 8 => [ + 'id' => 8, // must be identical to array key + 'createdAt' => '2023-06-19 13:31:24', + 'updatedAt' => '2023-07-25 14:22:05', + 'type' => 'public_sector', + 'name' => "Montpellier Méditerranée Métropole (34)", + 'slug' => 'montpellier-mediterranee-metropole-34', + 'website' => 'https://www.montpellier.fr', + 'logo' => 'User_Logo_Montpellier-Metropole.png', + 'oldComptoirId' => 36, + ], + 9 => [ + 'id' => 9, // must be identical to array key + 'createdAt' => '2024-06-19 13:31:24', + 'updatedAt' => '2024-01-12 14:22:05', + 'type' => 'public_sector', + 'name' => "Groupement d'Intérêt Public Region Centre Interactive -RECIA- (45)", + 'slug' => 'groupement-interet-public-region-centre-interactive-recia-45', + 'website' => 'https://www.recia.fr', + 'logo' => 'User_Logo_recia.png', + 'oldComptoirId' => 26, + ], + 10 => [ + 'id' => 10, // must be identical to array key + 'createdAt' => '2024-06-19 13:31:24', + 'updatedAt' => '2024-01-12 14:22:05', + 'type' => 'company', + 'name' => "Makina Corpus", + 'slug' => 'makina-corpus', + 'website' => 'https://makina-corpus.com', + 'logo' => 'logo_makina_corpus.png', + 'oldComptoirId' => 187, + 'description' => [ + 'fr' => "Makina Corpus est une entreprise de services numériques qui conçoit et développe +des applications web et mobiles innovantes en s’appuyant exclusivement sur des logiciels libres. + +Makina Corpus a développé des compétences particulières dans le développement d’applications métiers, +de portails complexes et d’outils cartographiques, et privilégie les projets et les clients qui peuvent +avoir un impact positif dans la lutte contre le dérèglement climatique. + +Makina Corpus est également un éditeur de logiciels open source au service du développement des territoires. + +Makina Corpus Formation est un organisme de formation qui propose de monter en compétences +sur les outils utilisés quotidiennement par les experts de Makina Corpus. + +Enfin, le pôle Exploration de Makina Corpus investigue les champs de l’intelligence artificielle, +du traitement des données massives, de la dataviz et de la production de données ouvertes.", + ], + ], + 11 => [ + 'id' => 11, // must be identical to array key + 'createdAt' => '2024-06-19 13:31:24', + 'updatedAt' => '2024-01-12 14:22:05', + 'type' => 'company', + 'name' => "Libriciel SCOP", + 'slug' => 'libriciel-scop', + 'website' => 'https://www.libriciel.fr', + 'logo' => 'Libriciel_TR---Copie.png', + 'oldComptoirId' => 187, + 'description' => [ + 'fr' => "La coopérative Libriciel SCOP développe et maintient depuis 2006 des solutions +sous licence libre pour les administrations publiques et les collectivités territoriales, +et plus spécifiquement des applications répondant aux enjeux actuels de la dématérialisation +au sein du secteur public : transaction sécurisée, signature électronique, +archivage électronique, gestion des actes administratifs...", + ], + ], ]; @@ -96,6 +224,9 @@ public function load(ObjectManager $manager): void if (isset($data['oldComptoirId'])) { $organization->setOldComptoirId($data['oldComptoirId']); } + if (isset($data['logo'])) { + $organization->setLogo($data['logo']); + } $manager->persist($organization); $manager->flush(); diff --git a/webapp/src/DataFixtures/AppSoftwareFixtures.php b/webapp/src/DataFixtures/AppSoftwareFixtures.php index 3a4a05f..3a4f090 100644 --- a/webapp/src/DataFixtures/AppSoftwareFixtures.php +++ b/webapp/src/DataFixtures/AppSoftwareFixtures.php @@ -44,6 +44,7 @@ public function load(ObjectManager $manager): void 'websiteUrl' => 'https://superset.apache.org', 'repositoryUrl' => 'https://github.com/apache/superset', 'oldId' => 418, + 'logo' => 'apache-superset.png', ]; $softwareList[1] = [ 'name' => 'API Platform', @@ -51,8 +52,9 @@ public function load(ObjectManager $manager): void 'createdAt' => '2023-06-19 13:31:24', 'updatedAt' => '2023-06-19 13:31:24', 'websiteUrl' => 'https://api-platform.com/', - 'repositoryUrl' => 'https://github.com/api-platform/api-platform,api-platform', + 'repositoryUrl' => 'https://github.com/api-platform/api-platform', 'oldId' => 629, + 'logo' => 'logo-api platform.png', ]; foreach ($softwareList as $key => $softwareData) { @@ -74,6 +76,9 @@ public function addSoftware(array $softwareData): Software $software->setWebsiteUrl($softwareData['websiteUrl']); $software->setRepositoryUrl($softwareData['repositoryUrl']); $software->setOldComptoirId($softwareData['oldId']); + if (isset($softwareData['logo'])) { + $software->setLogo($softwareData['logo']); + } $this->manager->persist($software); $this->manager->flush(); return $software; -- GitLab