Remove old MailgatewayRequestFactory

This commit is contained in:
philipp lang 2024-10-20 18:30:33 +02:00
parent ff47b024f5
commit 3009003545
1 changed files with 0 additions and 61 deletions

View File

@ -1,61 +0,0 @@
<?php
namespace Tests\RequestFactories;
use App\Mailgateway\Types\Type;
use Worksome\RequestFactories\RequestFactory;
class MailgatewayRequestFactory extends RequestFactory
{
public function definition(): array
{
return [
'name' => $this->faker->words(5, true),
'type' => [
'cls' => app('mail-gateways')->random(),
'params' => [],
],
'domain' => $this->faker->safeEmailDomain(),
];
}
public function name(string $name): self
{
return $this->state(['name' => $name]);
}
public function domain(string $domain): self
{
return $this->state(['domain' => $domain]);
}
/**
* @param class-string<Type> $type
* @param array<string, mixed> $params
*/
public function type(string $type, array $params): self
{
return $this->state(['type' => [
'cls' => $type,
'params' => $params,
]]);
}
public function missingType(): self
{
return $this->state(['type' => [
'cls' => null,
'params' => [],
]]);
}
public function withoutName(): self
{
return $this->state(['name' => '']);
}
public function withoutDomain(): self
{
return $this->state(['domain' => '']);
}
}