Skip to content
Snippets Groups Projects
Commit b55ecd26 authored by Laurent's avatar Laurent
Browse files

hotline #124962 ToutApprendre : fix editor fulltext indexation

parent fdc19f39
Branches
Tags
2 merge requests!3840Hotline,!3817hotline #124962 ToutApprendre : fix editor fulltext indexation
Pipeline #12203 passed with stage
in 51 minutes and 17 seconds
- ticket #124962 : Connecteur ToutApprendre : indexation de l'éditeur pour la recherche full text
\ No newline at end of file
......@@ -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();
}
......
......@@ -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
}
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