Create DeleteShortUrlVisitsCommand

This commit is contained in:
Alejandro Celaya
2023-05-15 09:43:05 +02:00
parent 6bb8c1b2f5
commit 02a8ef7dd9
34 changed files with 163 additions and 99 deletions

View File

@@ -320,27 +320,6 @@ class CreateShortUrlTest extends ApiTestCase
yield 'example domain' => ['example.com'];
}
#[Test, DataProvider('provideTwitterUrls')]
public function urlsWithBotProtectionCanBeShortenedWithUrlValidationEnabled(string $longUrl): void
{
// Requests to Twitter are randomly failing from GitHub actions. Let's skip this test there.
// This is a deprecated and low-used feature anyway.
if (env('CI', false)) {
$this->markTestSkipped();
}
[$statusCode] = $this->createShortUrl(['longUrl' => $longUrl, 'validateUrl' => true]);
self::assertEquals(self::STATUS_OK, $statusCode);
}
public static function provideTwitterUrls(): iterable
{
yield ['https://twitter.com/shlinkio'];
yield ['https://mobile.twitter.com/shlinkio'];
yield ['https://twitter.com/shlinkio/status/1360637738421268481'];
yield ['https://mobile.twitter.com/shlinkio/status/1360637738421268481'];
}
#[Test]
public function canCreateShortUrlsWithEmojis(): void
{