Disable title resolution for API and CLI tests

This commit is contained in:
Alejandro Celaya
2026-06-11 10:25:59 +02:00
parent a01f8d5749
commit b0fcc779f7
2 changed files with 4 additions and 12 deletions
+3
View File
@@ -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,
]);