Feat: Implement entities for user and teamer, finalize login process
This commit is contained in:
@@ -13,7 +13,7 @@ class ResponseParserTest extends TestCase
|
||||
{
|
||||
$content = '<?xml version="1.0" encoding="utf-8"?><ergebnis><satz typ="HINWEIS"><nr>853</nr><text>ID, EMail oder Passwort falsch</text></satz></ergebnis>';
|
||||
|
||||
$parser = new ResponseParser();
|
||||
$parser = $this->getParserInstance();
|
||||
$response = $parser->parseXmlString($content);
|
||||
|
||||
$this->assertEquals(853, $response->getCode());
|
||||
@@ -25,7 +25,7 @@ class ResponseParserTest extends TestCase
|
||||
{
|
||||
$content = '<?xml version="1.0" encoding="utf-8"?><ergebnis><satz typ="KUNDENKONTO"></satz><art>Adressdaten</art><idadresse>141747</idadresse><idperson>224526</idperson><adressdaten><name>Fromme</name><vorname>Björn</vorname><anrede>Herr</anrede><titel></titel><geschlecht>M</geschlecht><geburtsdatum>16.04.1972</geburtsdatum><nationalitaet>D</nationalitaet><anschrift><id>119447</id><strasse>Emilienstraße 57</strasse><plz>42853</plz><ort>Remscheid</ort><ortsteil></ortsteil><land>D</land></anschrift><kommunikation><telefonmobil></telefonmobil><email>[email protected]</email><newsletter>False</newsletter><telefonprivat>02191-4615837</telefonprivat></kommunikation></adressdaten></ergebnis>';
|
||||
|
||||
$parser = new ResponseParser();
|
||||
$parser = $this->getParserInstance();
|
||||
$response = $parser->parseXmlString($content);
|
||||
|
||||
$this->assertInstanceOf(ProfileResponse::class, $response);
|
||||
@@ -38,7 +38,7 @@ class ResponseParserTest extends TestCase
|
||||
{
|
||||
$content = '<?xml version="1.0" encoding="utf-8"?><ergebnis><satz typ="KUNDENKONTO"></satz><art>SelektionCRM</art><idadresse>141747</idadresse><idperson>224526</idperson><selektionsmerkmale><selektionsgruppe id="6" bezeichnung="Gruppen - Art (NUR direkt dem GR-Kunden zuordnen)"><selektion id="1156" bezeichnung="Gruppen-Buchungsportal" aenderbar="False" auswahl="True"></selektion></selektionsgruppe><selektionsgruppe id="10" bezeichnung="TEAM"><selektion id="1070" bezeichnung="E&P Teamer - allg. Merkmal" aenderbar="False" auswahl="True"></selektion></selektionsgruppe><selektionsgruppe id="83" bezeichnung="Interessen"><selektion id="1064" bezeichnung="Sportclub-Reisen" aenderbar="True" auswahl="False"></selektion><selektion id="1065" bezeichnung="Individual-Ferienwohnungen/Gasthöfe" aenderbar="True" auswahl="False"></selektion><selektion id="1066" bezeichnung="Kurztrips" aenderbar="True" auswahl="False"></selektion><selektion id="1067" bezeichnung="Eventreisen" aenderbar="True" auswahl="False"></selektion><selektion id="1068" bezeichnung="Gruppen-Angebote" aenderbar="True" auswahl="False"></selektion><selektion id="1069" bezeichnung="Firmen-Angebote" aenderbar="True" auswahl="False"></selektion></selektionsgruppe></selektionsmerkmale><crmaktionen><crmaktion id="428" code="18DDW40" bezeichnung="Deal Der Woche KW40-2018" aenderbar="False" auswahl="False"></crmaktion><crmaktion id="276" code="NOMAIL" bezeichnung="Ich möchte keine Werbung per Mail erhalten" aenderbar="True" auswahl="True"></crmaktion></crmaktionen></ergebnis>';
|
||||
|
||||
$parser = new ResponseParser();
|
||||
$parser = $this->getParserInstance();
|
||||
$response = $parser->parseXmlString($content);
|
||||
|
||||
$this->assertInstanceOf(CrmAttributesResponse::class, $response);
|
||||
@@ -48,4 +48,13 @@ class ResponseParserTest extends TestCase
|
||||
$this->assertCount(3, $response->getAttributeGroups());
|
||||
$this->assertTrue($response->isTeamer());
|
||||
}
|
||||
|
||||
private function getParserInstance(): ResponseParser
|
||||
{
|
||||
return new ResponseParser([
|
||||
'bpn_crm_id_admin' => 1292,
|
||||
'bpn_crm_id_manager' => 1293,
|
||||
'bpn_crm_id_teamer' => 1070,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user