19 declare(strict_types=1);
26 class RequestProcessorIdentifyTest
extends RequestProcessorTestCase
28 public function testGetResponseToRequestIdentify(): void
30 $processor =
new RequestProcessor(
32 $this->getSettings(
'',
'name of repo',
'mail of contact'),
33 $this->getRepository(
'2021-10-20'),
34 $this->getTokenHandler()
37 $expected_response = <<<XML
39 <response_info>
base url:Identify:</response_info>
47 $response = $processor->getResponseToRequest($this->getRequest(
53 $this->assertXmlStringEqualsXmlString($expected_response,
$response->saveXML());
56 public function testGetResponseToRequestIdentifyAdditionalArgumentError(): void
58 $processor =
new RequestProcessor(
60 $this->getSettings(
'',
'name of repo',
'mail of contact'),
61 $this->getRepository(
'2021-10-20'),
62 $this->getTokenHandler()
65 $expected_response = <<<XML
67 <response_info>
base url:Identify:
from=some date</response_info>
68 <error>badArgument</error>
72 $response = $processor->getResponseToRequest($this->getRequest(
75 [Argument::FROM_DATE->value =>
'some date'],
79 $this->assertXmlStringEqualsXmlString($expected_response,
$response->saveXML());
info()
description: > Example for rendering a info message box.