mirror of
https://github.com/shlinkio/shlink.git
synced 2024-12-22 15:13:59 -06:00
Replaced third party domains used in tests by custom shlink domains
This commit is contained in:
parent
f6bddc6f24
commit
45ac2c3c51
@ -84,7 +84,7 @@ class UrlValidatorTest extends TestCase
|
||||
public function provideUrls(): iterable
|
||||
{
|
||||
yield 'regular domain' => ['http://foobar.com', 'http://foobar.com'];
|
||||
yield 'IDN' => ['https://cédric.laubacher.io/', 'https://xn--cdric-bsa.laubacher.io/'];
|
||||
yield 'IDN' => ['https://tést.shlink.io', 'https://xn--tst-bma.shlink.io'];
|
||||
}
|
||||
|
||||
/** @test */
|
||||
|
@ -188,16 +188,17 @@ class CreateShortUrlActionTest extends ApiTestCase
|
||||
*/
|
||||
public function createsNewShortUrlWithInternationalizedDomainName(string $longUrl): void
|
||||
{
|
||||
[$statusCode, ['longUrl' => $expectedLongUrl]] = $this->createShortUrl(['longUrl' => $longUrl]);
|
||||
[$statusCode, $payload] = $this->createShortUrl(['longUrl' => $longUrl]);
|
||||
|
||||
$this->assertEquals(self::STATUS_OK, $statusCode);
|
||||
$this->assertEquals($expectedLongUrl, $longUrl);
|
||||
$this->assertEquals($payload['longUrl'], $longUrl);
|
||||
}
|
||||
|
||||
public function provideIdn(): iterable
|
||||
{
|
||||
// TODO Create some shlink IDN domains to test this instead of using public ones
|
||||
return [['https://cédric.laubacher.io/'], ['https://laubacher.io/']]; // Second one redirects to first
|
||||
yield ['http://tést.shlink.io']; // Redirects to https://shlink.io
|
||||
yield ['http://test.shlink.io']; // Redirects to http://tést.shlink.io
|
||||
yield ['http://téstb.shlink.io']; // Redirects to http://tést.shlink.io
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user