Skip to content
Snippets Groups Projects
Commit 0250c52f authored by efalcy's avatar efalcy
Browse files

Gallica : validation XML test 11

parent b9ecc873
Branches
Tags
No related merge requests found
......@@ -48,12 +48,17 @@ class Class_WebService_OAI_Request_ListIdentifiers {
$this->_until = $this->_params['until'];
$this->_resumptionToken = $this->_params['resumptionToken'];
if ($this->_resumptionToken
&& ($token = Class_WebService_OAI_ResumptionToken::find($this->_resumptionToken))) {
$this->_set = $token->getParam('set');
$this->_from = $token->getParam('from');
$this->_until = $token->getParam('until');
}
if (!strtotime($this->_until))
$this->_until = null;
if (!strtotime($this->_from))
$this->_from = null;
$this->_catalogue = $this->getCatalogueFromSetSpec($this->_set);
}
......
......@@ -298,6 +298,16 @@ class OAIControllerListIdentifiersInvalidParamsTest extends AbstractControllerTe
$this->_xpath->assertXPath($this->_response->getBody(),
'//oai:error[@code="badResumptionToken"]');
}
/** @test */
public function withBadFromAndUntilResponseShouldNotContainsAttributes() {
$this->dispatch('/opac/oai/request?verb=ListIdentifiers&metadataPrefix=oai_dc&set=really_wrong_set&from=some_random_date&until=some_random_date');
$this->_xpath->assertXPath($this->_response->getBody(),
'//oai:request[not(@from)][not(@until)]');
}
}
......
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