mirror of
https://github.com/shlinkio/shlink.git
synced 2026-08-02 09:29:19 -05:00
Disable title resolution for API and CLI tests
This commit is contained in:
@@ -10,4 +10,7 @@ return [
|
||||
// URL shortener
|
||||
EnvVars::DEFAULT_DOMAIN->value => 's.test',
|
||||
EnvVars::IS_HTTPS_ENABLED->value => false,
|
||||
|
||||
// Disable title auto-resolution, as it slows down API and CLI tests
|
||||
EnvVars::AUTO_RESOLVE_TITLES->value => false,
|
||||
];
|
||||
|
||||
@@ -310,17 +310,6 @@ class CreateShortUrlTest extends ApiTestCase
|
||||
self::assertEquals('http://s.test/🦣🦣🦣', $payload['shortUrl']);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function titleIsIgnoredIfLongUrlTimesOut(): void
|
||||
{
|
||||
[$statusCode, $payload] = $this->createShortUrl([
|
||||
'longUrl' => 'http://127.0.0.1:9999/api-tests/long-url-with-timeout',
|
||||
]);
|
||||
|
||||
self::assertEquals(self::STATUS_OK, $statusCode);
|
||||
self::assertNull($payload['title']);
|
||||
}
|
||||
|
||||
#[Test, DataProvider('provideTitles')]
|
||||
public function titleIsCroppedIfTooLong(string $title, string $expectedTitle): void
|
||||
{
|
||||
@@ -347,7 +336,7 @@ class CreateShortUrlTest extends ApiTestCase
|
||||
public function prefixCanBeSet(string|null $customSlug): void
|
||||
{
|
||||
[$statusCode, $payload] = $this->createShortUrl([
|
||||
'longUrl' => 'https://github.com/shlinkio/shlink/issues/1557',
|
||||
'longUrl' => 'https://example.com',
|
||||
'pathPrefix' => 'foo/b ar-baz',
|
||||
'customSlug' => $customSlug,
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user