diff --git a/VERSIONS_HOTLINE/159661 b/VERSIONS_HOTLINE/159661 new file mode 100644 index 0000000000000000000000000000000000000000..e7fd890a5aaf438ef8e4f51451f83c6940e76e38 --- /dev/null +++ b/VERSIONS_HOTLINE/159661 @@ -0,0 +1 @@ + - correctif #159661 : Sitotheque : Les ressources en ligne dont le nom est exactement inclus dans l'url apparaissent maintenant en recherche \ No newline at end of file diff --git a/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php b/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php index 2cd666a835407c6aa77f96d2f9d9670162143ef9..3a820fed97795cbaf1cee4c11dea121e75d84ea1 100644 --- a/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php +++ b/cosmogramme/tests/php/classes/NanookRecordsIntegrationTest.php @@ -196,7 +196,7 @@ class NanookRecordsIntegrationInterestEsperluetteTest extends NanookRecordsInteg /** @test */ public function deweyShouldContainsEsperluette() { - $this->assertEquals('80993352 ESPERLUETTE 2014 ESPERLUET', $this->notice->getDewey()); + $this->assertEquals('809 933 52 ESPERLUETTE 2014 ESPERLUET', $this->notice->getDewey()); } } diff --git a/library/Class/Indexation.php b/library/Class/Indexation.php index e7ce06a5d3ee5e61a93eb8fe2d39eaae7f682194..e88229e9804b9431e0e29ebb2ac58cd65f01fb37 100644 --- a/library/Class/Indexation.php +++ b/library/Class/Indexation.php @@ -223,8 +223,7 @@ class Class_Indexation { public function stripSpecialCharacters($chaine){ - $tab = ['.' => '', - + $tab = [ 'æ' => 'ae', 'Æ' => 'ae', diff --git a/library/digital_resources/ToutApprendre/tests/ToutApprendreTest.php b/library/digital_resources/ToutApprendre/tests/ToutApprendreTest.php index 8b124d79e9f4956c3e782acb3f35e9d3a143006a..9768b71f5e553a43ca5e14aa331ea3ba8b1be07f 100644 --- a/library/digital_resources/ToutApprendre/tests/ToutApprendreTest.php +++ b/library/digital_resources/ToutApprendre/tests/ToutApprendreTest.php @@ -368,7 +368,7 @@ class ToutApprendreHarvestIndexationTest extends ToutApprendreHarvestTestCase { /** @test */ public function recordFullTextEditeurShouldBePhoneticToutApprendreEduPerformance() { - $this->assertEquals('TOUTAPPRENDRECOM EDUPERFORMANCE TOUTAPRANDREKON EDUPERFORMANS', + $this->assertEquals('TOUTAPPRENDRE COM EDUPERFORMANCE TOUTAPRANDR EDUPERFORMANS', Class_Notice::find(1)->getEditeur()); } } diff --git a/tests/application/modules/admin/controllers/AlbumControllerTest.php b/tests/application/modules/admin/controllers/AlbumControllerTest.php index 2b2787bea3a7d68446ce70bc1a80c2d11f6378fd..a6411c6b166e00e292464240878f8bfefe2f92ea 100644 --- a/tests/application/modules/admin/controllers/AlbumControllerTest.php +++ b/tests/application/modules/admin/controllers/AlbumControllerTest.php @@ -333,6 +333,51 @@ class Admin_AlbumControllerWithoutBibNumTest extends Admin_AlbumControllerTestCa +class Admin_AlbumControllerRessourceNumeriqueIndexationTest extends AbstractControllerTestCase { + protected $_album; + public function setUp() { + parent::setUp(); + $this->_album = $this->fixture(Class_Album::class, + ['id' => 8701, + 'titre' => 'Mediapart', + 'description' => '<a href="http://iepnomade.grenet.fr/login?url=http://www.mediapart.fr/licence">Journal d’information numérique</a>, indépendant et participatif.', + 'tags' => "presse;media;journalisme d'enquête;politique", + 'type_doc_id' => '116', + 'id_langue' => 'fre', + 'visible' => 1, + 'droits' => 'Domaine Public', + 'status' => 3, + ]); + $ressource = $this->fixture(Class_AlbumRessource::class, + ['id' => 13, + 'album' => $this->_album, + 'ordre' => 1, + 'folio' => 99, + 'url' => 'http://iepnomade.grenet.fr/login?url=http://www.mediapart.fr/licence', + 'poster' => '99_DOC_Page-accueil-mediapart_20210408.jpg' + ]); + $this->_album->setRessources([$ressource]); + $this->_album->index(); + Class_Cosmovar::setValueOf('unimarc_zone_titre','200$a;200$e;200$d;200$i;215$a;327$a;464$t;200$c;200$h;304$a;464$t;470$t;481$t;482$t;488$t;500$a;500$h;500$i;503$a;510$a;510$e;510$h;510$i;512$a;512$e;512$h;512$i;513$a;530$a;531$a;532$a'); + } + + + /** @test */ + public function noticeCreated646tShouldContainsUrl() { + $this->assertEquals(['http://iepnomade.grenet.fr/login?url=http://www.mediapart.fr/licence'], + Class_Notice::findFirstBy([])->get_subfield('464','t')); + } + + + /** @test */ + public function noticeCreatedTitreShouldContainsMediapart() { + $this->assertContains('MEDIAPART ', Class_Notice::findFirstBy([])->getTitres()); + } +} + + + + class Admin_AlbumControllerAddCategorieToFavorisTest extends Admin_AlbumControllerTestCase { public function setUp() { parent::setUp(); diff --git a/tests/library/Class/MoteurRechercheTest.php b/tests/library/Class/MoteurRechercheTest.php index df1161c2772b2772157c0409dd87578184479579..c4d780d9beb67c0be9526be5e960a0da65511d8f 100644 --- a/tests/library/Class/MoteurRechercheTest.php +++ b/tests/library/Class/MoteurRechercheTest.php @@ -310,6 +310,12 @@ class MoteurRechercheSimpleTest extends MoteurRechercheTestCase { 'req_liste' => $this->listSqlWith($match_axes . " AGAINST('+(AMOUR AMOURS AMOUR) +(EST ESTS) +(DAN DANS) +(PRE PRES)' IN BOOLEAN MODE)", 'alpha_titre')], + [['expressionRecherche' => 'L\'amour y\'est.dans le pré', + 'tri' => 'alpha_titre'] , + 'nb_mots' => 4, + 'req_liste' => $this->listSqlWith($match_axes . " AGAINST('+(AMOUR AMOURS AMOUR) +(EST ESTS) +(DAN DANS) +(PRE PRES)' IN BOOLEAN MODE)", + 'alpha_titre')], + [['expressionRecherche' => 'La commune de Paris', 'annexe' => 'MED1', 'selection_annexe' => 'TUN;TAP', @@ -438,7 +444,7 @@ class MoteurRechercheSimpleTest extends MoteurRechercheTestCase { 'nb_mots' => 3, 'req_liste' => $this->listSqlWith("MATCH(titres, auteurs, editeur, collection, matieres, dewey, other_terms) AGAINST('+(DVORAK DVORAKS DVORAK) +(ANTONIN ANTONINS ANTONIN) +(MALO MALOS MALO)' IN BOOLEAN MODE)", 'alpha_titre limit 10') - ], + ], ]; }