Return fake when destroySuccessfully called on fake
This commit is contained in:
parent
8cf7bd2cf2
commit
5cc41babd8
|
@ -152,13 +152,15 @@ class MembershipFake extends Fake
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deletesSuccessfully(int $memberId, int $membershipId): void
|
public function destroysSuccessfully(int $memberId, int $membershipId): self
|
||||||
{
|
{
|
||||||
Http::fake(function ($request) use ($memberId, $membershipId) {
|
Http::fake(function ($request) use ($memberId, $membershipId) {
|
||||||
if ($request->url() === "https://nami.dpsg.de/ica/rest/nami/zugeordnete-taetigkeiten/filtered-for-navigation/gruppierung-mitglied/mitglied/{$memberId}/{$membershipId}" && 'DELETE' === $request->method()) {
|
if ($request->url() === "https://nami.dpsg.de/ica/rest/nami/zugeordnete-taetigkeiten/filtered-for-navigation/gruppierung-mitglied/mitglied/{$memberId}/{$membershipId}" && 'DELETE' === $request->method()) {
|
||||||
return $this->nullResponse();
|
return $this->nullResponse();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function failsDeleting(int $memberId, ?int $membershipId): void
|
public function failsDeleting(int $memberId, ?int $membershipId): void
|
||||||
|
|
Loading…
Reference in New Issue