Skip to content
Snippets Groups Projects
Commit 1bb85c42 authored by Alex Arnaud's avatar Alex Arnaud
Browse files

Merge branch 'dev#182440_disable_cache_for_oai_listrecords' into 'master'

dev#182440: disable cache on oai ListRecords request

See merge request !4822
parents 1398c4cc 1a23065b
Branches
Tags
1 merge request!4822dev#182440: disable cache on oai ListRecords request
Pipeline #25974 passed with stage
in 15 minutes and 41 seconds
- fonctionnalité #182440 : Export OAI : Correction de la génération du flux OAI ListRecord. Le cache est désactivé pour la récupération des notices.
\ No newline at end of file
......@@ -80,6 +80,7 @@ class OaiController extends ZendAfi_Controller_Action {
public function listRecordsAction() {
Storm_Cache::setDefaultZendCache(null);
$request = new Class_WebService_OAI_Request_ListRecords($this->_request->getParams(),
$this->buildBaseUrl());
$item_builder = new Class_WebService_OAI_Response_RecordBuilder();
......
......@@ -80,10 +80,15 @@ abstract class OAIControllerListRecordsInZorkSetTestCase
class OAIControllerListRecordsInZorkSetTest
extends OAIControllerListRecordsInZorkSetTestCase {
protected $_cache;
public function setUp() {
parent::setUp();
$this->_cache = $this->mock();
Storm_Cache::setDefaultZendCache($this->_cache);
$this->dispatch('/opac/oai/request?verb=ListRecords&metadataPrefix=oai_dc&set=zork');
$this->_body = $this->_response->getBody();
}
......@@ -144,6 +149,12 @@ class OAIControllerListRecordsInZorkSetTest
}
/** @test */
public function cacheShouldNotBeUsed() {
$this->assertFalse($this->_cache->methodHasBeenCalled('load'));
}
protected function _assertHeaderContentAt($header, $content, $position) {
$path = sprintf('//oai:ListRecords/oai:record[%s]/oai:header/oai:%s',
$position, $header);
......
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