From 5b4ec86fe9caef98c965c315f4b7694402a07271 Mon Sep 17 00:00:00 2001 From: Philipp Lang Date: Mon, 6 Mar 2023 09:31:34 +0100 Subject: [PATCH] Add beitragsartName --- src/Data/Member.php | 3 +++ tests/Unit/Api/FetchMemberTest.php | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/Data/Member.php b/src/Data/Member.php index 7dc7369..776cc97 100644 --- a/src/Data/Member.php +++ b/src/Data/Member.php @@ -31,6 +31,9 @@ class Member extends Data #[MapInputName('beitragsartId')] public ?int $feeId, + #[MapInputName('beitragsart')] + public ?string $feeName, + #[MapInputName('eintrittsdatum')] #[WithCast(CarbonCast::class, format: 'Y-m-d H:i:s')] #[WithTransformer(CarbonTransformer::class, format: 'Y-m-d H:i:s')] diff --git a/tests/Unit/Api/FetchMemberTest.php b/tests/Unit/Api/FetchMemberTest.php index 3c1e095..3be58b2 100644 --- a/tests/Unit/Api/FetchMemberTest.php +++ b/tests/Unit/Api/FetchMemberTest.php @@ -12,6 +12,7 @@ class FetchMemberTest extends TestCase public function testGetASingleMember(): void { app(MemberFake::class)->shows(1000, 1001, [ + 'beitragsart' => 'Ba', 'beitragsartId' => 1, 'eintrittsdatum' => '2005-05-01 00:00:00', 'email' => 'pille@stamm-silva.de', @@ -45,6 +46,7 @@ class FetchMemberTest extends TestCase $member = $this->login()->member(1000, 1001); $this->assertSame(1, $member->feeId); + $this->assertSame('Ba', $member->feeName); $this->assertSame('2005-05-01 00:00:00', $member->joinedAt->toDateTimeString()); $this->assertSame(1000, $member->groupId); $this->assertSame(1001, $member->id);