Add beitragsartName

This commit is contained in:
Philipp Lang 2023-03-06 09:31:34 +01:00
parent 7b08f30cb2
commit 5b4ec86fe9
2 changed files with 5 additions and 0 deletions

View File

@ -31,6 +31,9 @@ class Member extends Data
#[MapInputName('beitragsartId')] #[MapInputName('beitragsartId')]
public ?int $feeId, public ?int $feeId,
#[MapInputName('beitragsart')]
public ?string $feeName,
#[MapInputName('eintrittsdatum')] #[MapInputName('eintrittsdatum')]
#[WithCast(CarbonCast::class, format: 'Y-m-d H:i:s')] #[WithCast(CarbonCast::class, format: 'Y-m-d H:i:s')]
#[WithTransformer(CarbonTransformer::class, format: 'Y-m-d H:i:s')] #[WithTransformer(CarbonTransformer::class, format: 'Y-m-d H:i:s')]

View File

@ -12,6 +12,7 @@ class FetchMemberTest extends TestCase
public function testGetASingleMember(): void public function testGetASingleMember(): void
{ {
app(MemberFake::class)->shows(1000, 1001, [ app(MemberFake::class)->shows(1000, 1001, [
'beitragsart' => 'Ba',
'beitragsartId' => 1, 'beitragsartId' => 1,
'eintrittsdatum' => '2005-05-01 00:00:00', 'eintrittsdatum' => '2005-05-01 00:00:00',
'email' => 'pille@stamm-silva.de', 'email' => 'pille@stamm-silva.de',
@ -45,6 +46,7 @@ class FetchMemberTest extends TestCase
$member = $this->login()->member(1000, 1001); $member = $this->login()->member(1000, 1001);
$this->assertSame(1, $member->feeId); $this->assertSame(1, $member->feeId);
$this->assertSame('Ba', $member->feeName);
$this->assertSame('2005-05-01 00:00:00', $member->joinedAt->toDateTimeString()); $this->assertSame('2005-05-01 00:00:00', $member->joinedAt->toDateTimeString());
$this->assertSame(1000, $member->groupId); $this->assertSame(1000, $member->groupId);
$this->assertSame(1001, $member->id); $this->assertSame(1001, $member->id);