diff --git a/VERSIONS_HOTLINE/157372 b/VERSIONS_HOTLINE/157372 new file mode 100644 index 0000000000000000000000000000000000000000..2605a1873227c78842c5f6cf95985c0d44f075f5 --- /dev/null +++ b/VERSIONS_HOTLINE/157372 @@ -0,0 +1 @@ + - hotline#157372 : Ressources externes : L'url de moissonage Cyberlibris a changé. \ No newline at end of file diff --git a/library/digital_resources/Cyberlibris/Config.php b/library/digital_resources/Cyberlibris/Config.php index de1214c53171357ac8044dc66de28125e1d45149..c4385f30490468ad82e5d0e8c9342e1c672a9414 100644 --- a/library/digital_resources/Cyberlibris/Config.php +++ b/library/digital_resources/Cyberlibris/Config.php @@ -21,13 +21,12 @@ class Cyberlibris_Config extends Class_DigitalResource_Config { - const CYBERLIBRIS_HARVEST_URL = 'http://oai-bibliovox.cyberlibris.fr/oai.aspx', + const CYBERLIBRIS_HARVEST_URL = 'https://unr-ra.scholarvox.com/oai/', CATEGORY_LABEL = 'CyberLibris'; protected function _getConfig() { return ['Introduction' => $this->_('Cyberlibris'), 'HelpLink' => 'http://wiki.bokeh-library-portal.org/index.php/Cyberlibris', - 'Url' => 'https://www.cyberlibris.com//', 'Icon' => 'https://www.unilim.fr/scd/wp-content/uploads/sites/6/2016/09/logo_cyberlibris_400x300-300x225.jpg', 'PermissionLabel' => $this->_('Bibliothèque numérique: accéder à la ressource Cyberlibris'), diff --git a/library/digital_resources/Cyberlibris/images/icon.jpg b/library/digital_resources/Cyberlibris/images/icon.jpg new file mode 100644 index 0000000000000000000000000000000000000000..0a16d9369702315203e9a49a2093ffd5d3d2be0e Binary files /dev/null and b/library/digital_resources/Cyberlibris/images/icon.jpg differ diff --git a/library/digital_resources/Cyberlibris/tests/CyberlibrisTest.php b/library/digital_resources/Cyberlibris/tests/CyberlibrisTest.php index a192e7f0f5b5a8ac4a6cf91731f6e778f412f630..4b8299eab70444b6ecba36b95b66e5291cc10e9b 100644 --- a/library/digital_resources/Cyberlibris/tests/CyberlibrisTest.php +++ b/library/digital_resources/Cyberlibris/tests/CyberlibrisTest.php @@ -26,6 +26,11 @@ abstract class CyberlibrisActivatedTestCase extends AbstractControllerTestCase { parent::setUp(); Class_AdminVar::set('Cyberlibris_URL', 'https://bokeh-test-oai-bibliovox.cyberlibris.fr/oai.aspx'); } + + public function tearDown() { + Class_AdminVar::set('Cyberlibris_URL', ''); + parent::tearDown(); + } } @@ -66,6 +71,46 @@ class CyberlibrisDashboardUnactivatedTest extends AbstractControllerTestCase { +class CyberlibrisConfigUrlTest extends AbstractControllerTestCase { + protected $_config; + public function setUp() { + parent::setUp(); + $this->_config = Cyberlibris_Config::getInstance(); + } + + + /** @test */ + public function withoutUrlSetconfigUrlShouldBeCyberlibrisHarvestUrl() { + $this->assertEquals('https://unr-ra.scholarvox.com/oai/', $this->_config->getHarvestUrl()); + } +} + + + +class CyberlibrisHarvestUrlTest extends AbstractControllerTestCase { + protected $_config; + public function setUp() { + parent::setUp(); + Class_AdminVar::set('Cyberlibris_URL', 'http://bokeh.afi-sa.net'); + $this->_config = Cyberlibris_Config::getInstance(); + } + + public function tearDown() { + Class_AdminVar::set('Cyberlibris_URL',''); + parent::tearDown(); + } + + + /** @test */ + public function withoutUrlSetconfigUrlShouldBeCyberlibrisHarvestUrl() { + $this->assertEquals('http://bokeh.afi-sa.net', $this->_config->getHarvestUrl()); + } +} + + + + + class CyberlibrisDashboardActivatedTest extends CyberlibrisActivatedTestCase { public function setUp() { diff --git a/scripts/cyberLibris_first_harvest.php b/scripts/cyberLibris_first_harvest.php index bfa4a6cd6e6b7f75c6b739836f923b442942424b..9a7639bea2788658118d8009390ca154a45da997 100644 --- a/scripts/cyberLibris_first_harvest.php +++ b/scripts/cyberLibris_first_harvest.php @@ -20,7 +20,6 @@ class Write_Log_In_Temp { echo "\n\nWelcome to the oaiharvester Pro tool\n\n"; -Class_AdminVar::set('CYBERLIBRIS_URL', Cyberlibris_Config::CYBERLIBRIS_HARVEST_URL); Class_DigitalResource::getInstance()->getHarvesters(); (new CyberLibris_Harvester)