Lint
This commit is contained in:
parent
e8df1a18e4
commit
61cc08dda0
|
@ -6,6 +6,9 @@ use Illuminate\Support\Facades\Http;
|
|||
|
||||
class MembershipFake extends Fake
|
||||
{
|
||||
/**
|
||||
* @param array<int, int|array{id: int, entries_taetigkeit?: string, entries_aktivVon?: string, entries_aktivBis?: string, entries_untergliederung?: string, entries_gruppierung?: string}> $membershipIds
|
||||
*/
|
||||
public function fetches(int $memberId, array $membershipIds): self
|
||||
{
|
||||
Http::fake(function ($request) use ($memberId, $membershipIds) {
|
||||
|
@ -54,6 +57,9 @@ class MembershipFake extends Fake
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param array{id: int, gruppierung?: string, taetigkeit?: string, taetigkeitId?: int, untergliederung?: string, untergliederungId?: int, aktivVon?: string, aktivBis?: string} $data
|
||||
*/
|
||||
public function shows(int $memberId, array $data): self
|
||||
{
|
||||
Http::fake(function ($request) use ($memberId, $data) {
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
namespace Zoomyboy\LaravelNami\Tests\Unit;
|
||||
|
||||
use Zoomyboy\LaravelNami\Fakes\MembershipFake;
|
||||
use Zoomyboy\LaravelNami\Tests\TestCase;
|
||||
|
||||
class PullMembershipTest extends TestCase
|
||||
{
|
||||
public function testGetASingleMembership(): void
|
||||
{
|
||||
app(MembershipFake::class)
|
||||
->fetches(105, [['id' => 56, 'entries_taetigkeit' => 'Leiter']]);
|
||||
|
||||
$memberships = $this->login()->membershipsOf(105);
|
||||
|
||||
$this->assertEquals('Leiter', $memberships->first()->activity);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue