test: update test suite

This commit is contained in:
Maël Gangloff
2025-10-15 23:01:31 +02:00
parent ddee6df4bd
commit 00469cad6b
5 changed files with 11 additions and 11 deletions

View File

@@ -53,11 +53,11 @@ final class WatchListUpdateProcessorTest extends ApiTestCase
$this->assertCount(1, $data['trackedEvents']);
}
public static function createUserAndWatchlist(?Client $client = null): Client
public static function createUserAndWatchlist(?Client $client = null, array $domains = ['/api/domains/example.com']): Client
{
$client = $client ?? self::createClientWithCredentials(self::getToken(UserFactory::createOne()));
$client->request('POST', '/api/watchlists', ['json' => [
'domains' => ['/api/domains/example.com'],
'domains' => $domains,
'name' => 'My Watchlist',
'trackedEvents' => ['last changed', 'transfer', 'expiration', 'deletion'],
]]);