Add group name to membership

This commit is contained in:
philipp lang 2022-03-06 02:50:00 +01:00
parent 33125a511a
commit 99974ec425
2 changed files with 5 additions and 0 deletions

View File

@ -30,6 +30,9 @@ class Membership extends DataTransferObject {
#[MapFrom('untergliederungId')] #[MapFrom('untergliederungId')]
public int $subactivityId; public int $subactivityId;
#[MapFrom('gruppierung')]
public ?string $group;
public function toNami(): array public function toNami(): array
{ {
return [ return [

View File

@ -23,6 +23,7 @@ class MembershipTest extends TestCase
'gruppierungId' => 1000, 'gruppierungId' => 1000,
'taetigkeitId' => 15, 'taetigkeitId' => 15,
'untergliederungId' => 16, 'untergliederungId' => 16,
'gruppierung' => '::group::',
]); ]);
$membership = $this->login()->membership(6, 10); $membership = $this->login()->membership(6, 10);
@ -34,6 +35,7 @@ class MembershipTest extends TestCase
$this->assertSame(1000, $membership->groupId); $this->assertSame(1000, $membership->groupId);
$this->assertSame(15, $membership->activityId); $this->assertSame(15, $membership->activityId);
$this->assertSame(16, $membership->subactivityId); $this->assertSame(16, $membership->subactivityId);
$this->assertSame('::group::', $membership->group);
} }
public function testFetchesMembership(): void public function testFetchesMembership(): void