Skip to content
Snippets Groups Projects
Commit fe26105e authored by Henri-Damien LAURENT's avatar Henri-Damien LAURENT
Browse files

hotline#124838 : StoryPlayR connector : fix mediathequeid to harvest xml file

parent 8af47b3a
No related merge requests found
Pipeline #12655 passed with stage
in 53 minutes and 53 seconds
- ticket #124838 : Connecteur StoryPlayR : Correction du mediathequeid de moissonage pour importer les ressources. Utiliser
\ No newline at end of file
......@@ -86,9 +86,14 @@ class StoryPlayR_Config extends Class_DigitalResource_Config {
public function getHarvestUrl($page = 1) {
$query = ['portalProvider' => 'bokeh',
'mediathequeid' => $this->getAdminVar('MEDIATHEQUE_ID')];
'mediathequeid' => 'bokeh-'.$this->getAdminVar('MEDIATHEQUE_ID')];
return $this->getAdminVar('OPDS_CATALOG_URL') . '?' . http_build_query(array_filter($query));
$url = $this->getAdminVar('OPDS_CATALOG_URL');
$url .= (strpos($url,"opds-with-links")=== FALSE)
? '-with-links'
: '';
return $url . '?' . http_build_query(array_filter($query));
}
......
......@@ -104,7 +104,7 @@ class StoryPlayRDashboardActivatedTest extends StoryPlayRActivatedTestCase {
public function setUp() {
parent::setUp();
Class_AdminVar::set('StoryPlayR_OPDS_CATALOG_URL',
'https://preprod.storyplayr.com/api/opds-with-links');
'https://preprod.storyplayr.com/api/opds');
Class_WebService_BibNumerique_Vignette::setHttpClient($this->mock()
->whenCalled('getResponse')
......@@ -155,7 +155,7 @@ class StoryPlayRDashboardActivatedTest extends StoryPlayRActivatedTestCase {
/** @test */
public function harvestUrlShouldContainsOpdsCatalogUrlAndProviderAndMediathequeid() {
$this->assertXPathContentContains('//pre', 'https://preprod.storyplayr.com/api/opds-with-links?portalProvider=bokeh');
$this->assertXPathContentContains('//pre', 'https://preprod.storyplayr.com/api/opds-with-links?portalProvider=bokeh&mediathequeid=bokeh-123456', $this->_response->getBody());
}
......
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