19 declare(strict_types=1);
26 class RequestProcessorListSetsTest
extends RequestProcessorTestCase
28 public function testGetResponseToRequestListSetsNoSetsError(): void
30 $processor =
new RequestProcessor(
33 $this->getRepository(),
34 $this->getTokenHandler()
37 $expected_response = <<<XML
39 <response_info>
base url:ListSets:</response_info>
40 <
set>
default:
default</
set>
46 $this->assertXmlStringEqualsXmlString($expected_response,
$response->saveXML());
49 public function testGetResponseToRequestListSetsAdditionalArgumentError(): void
51 $processor =
new RequestProcessor(
54 $this->getRepository(),
55 $this->getTokenHandler()
58 $expected_response = <<<XML
60 <response_info>
base url:ListSets:identifier=some
id</response_info>
61 <error>badArgument</error>
65 $response = $processor->getResponseToRequest($this->getRequest(
68 [Argument::IDENTIFIER->value =>
'some id'],
72 $this->assertXmlStringEqualsXmlString($expected_response,
$response->saveXML());
75 public function testGetResponseToRequestListSetsWithTokenBadResumptionTokenError(): void
77 $processor =
new RequestProcessor(
80 $this->getRepository(),
81 $this->getTokenHandler()
84 $expected_response = <<<XML
86 <response_info>
base url:ListSets:resumptionToken=token</response_info>
87 <error>badResumptionToken</error>
91 $response = $processor->getResponseToRequest($this->getRequest(
94 [Argument::RESUMPTION_TOKEN->value =>
'token']
97 $this->assertXmlStringEqualsXmlString($expected_response,
$response->saveXML());