853ID, EMail oder Passwort falsch'; $parser = $this->getParserInstance(); $response = $parser->parseXmlString($content); $this->assertEquals(853, $response->getCode()); $this->assertEquals('ID, EMail oder Passwort falsch', $response->getMessage()); $this->assertFalse($response->isSuccessful()); } public function testParseSuccessfulProfileResponse(): void { $content = 'Adressdaten141747224526FrommeBjörnHerrM16.04.1972D119447Emilienstraße 5742853RemscheidDmail@fromme.orgFalse02191-4615837'; $parser = $this->getParserInstance(); $response = $parser->parseXmlString($content); $this->assertInstanceOf(ProfileResponse::class, $response); $this->assertNull($response->getCode()); $this->assertNull($response->getMessage()); $this->assertTrue($response->isSuccessful()); } public function testParseSuccessfulCrmAttributesResponse(): void { $content = 'SelektionCRM141747224526'; $parser = $this->getParserInstance(); $response = $parser->parseXmlString($content); $this->assertInstanceOf(CrmAttributesResponse::class, $response); $this->assertNull($response->getCode()); $this->assertNull($response->getMessage()); $this->assertTrue($response->isSuccessful()); $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, ]); } }