diff --git a/VERSIONS_HOTLINE/124962 b/VERSIONS_HOTLINE/124962 new file mode 100644 index 0000000000000000000000000000000000000000..b39c1372f4f7c98148bca384c770629fa169a12c --- /dev/null +++ b/VERSIONS_HOTLINE/124962 @@ -0,0 +1 @@ + - ticket #124962 : Connecteur ToutApprendre : indexation de l'éditeur pour la recherche full text \ No newline at end of file diff --git a/library/Class/Indexation/PseudoNotice.php b/library/Class/Indexation/PseudoNotice.php index ccdd9b5d8992e833988ae7724c766d44aad33534..e340f01a14fada0257b828aaf041741782a51ad5 100644 --- a/library/Class/Indexation/PseudoNotice.php +++ b/library/Class/Indexation/PseudoNotice.php @@ -414,6 +414,7 @@ class Class_Indexation_PseudoNotice_Album extends Class_Indexation_PseudoNotice{ $model = $this->_model; $this->_datas['notes'] = $model->getNotesForPseudoNotice(); $this->_datas['created_at'] = $model->getCreatedAt(); + $this->_datas['editeur'] = $this->getEditorsNames(); } diff --git a/library/digital_resources/ToutApprendre/tests/ToutApprendreTest.php b/library/digital_resources/ToutApprendre/tests/ToutApprendreTest.php index f0434f5fbb92043013111d90f3e26b07effa4f38..20e7685399b1c541c8b8242a96355fd595ae4cbb 100644 --- a/library/digital_resources/ToutApprendre/tests/ToutApprendreTest.php +++ b/library/digital_resources/ToutApprendre/tests/ToutApprendreTest.php @@ -208,8 +208,6 @@ abstract class ToutApprendreHarvestTestCase extends ToutApprendreActivatedTestCa class ToutApprendreHarvestTest extends ToutApprendreHarvestTestCase { - - /** @test */ public function numberOfAlbumsShould5() { $this->assertCount(5, $this->_service->getRessourcesNumeriques()); @@ -295,14 +293,6 @@ class ToutApprendreHarvestTest extends ToutApprendreHarvestTestCase { } - /** @test */ - public function tagsShouldBeIndexedInRecord() { - $this->_first_album->index(); - $record = Class_Notice::find(1); - $this->assertContains('Z1 Z2', $record->getFacettes()); - } - - /** @test */ public function durationBeImported() { $this->assertEquals('3 heures',$this->_first_album->getDuration()); @@ -341,6 +331,43 @@ class ToutApprendreHarvestTest extends ToutApprendreHarvestTestCase { +class ToutApprendreHarvestIndexationTest extends ToutApprendreHarvestTestCase { + public function setUp() { + parent::setUp(); + $this->_first_album->index(); + } + + + /** @test */ + public function tagsShouldBeIndexedInRecord() { + $this->assertContains('Z1 Z2', Class_Notice::find(1)->getFacettes()); + } + + + /** @test */ + public function record214DollarCShouldContainsEditorEduPerformance() { + $this->assertEquals(['ToutApprendre.com - EduPerformance'], + Class_Notice::find(1)->get_subfield('214', 'c')); + } + + + /** @test */ + public function recordEditorsShouldContainsEduPerformance() { + $this->assertEquals(['ToutApprendre.com - EduPerformance'], + Class_Notice::find(1)->getEditeurs()); + } + + + /** @test */ + public function recordFullTextEditeurShouldBePhoneticToutApprendreEduPerformance() { + $this->assertEquals('TOUTAPPRENDRECOM TOUTAPRANDREKON EDUPERFORMANCE EDUPERFORMANS', + Class_Notice::find(1)->getEditeur()); + } +} + + + + class ToutApprendreHarvestIssueTest extends ToutApprendreActivatedTestCase { protected $_service; @@ -484,4 +511,4 @@ class ToutApprendreSsoResourceWithoutPermissionTest extends AbstractControllerTe public function shouldNotifyNotAllowed() { $this->assertFlashMessengerContentContains('Votre compte n\'est pas autorisé à accéder à cette ressource'); } -} \ No newline at end of file +}