mirror of
https://github.com/coollabsio/coolify.git
synced 2026-11-04 10:42:23 +00:00
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Furox <177975472+Furox-Art@users.noreply.github.com> Co-authored-by: johandenhollander <johan.den.hollander@finalist.nl> Co-authored-by: João Cruz <161638790+SrJooJ@users.noreply.github.com> Co-authored-by: Saim Hashmi <hashmisaim037@gmail.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
16 lines
593 B
PHP
16 lines
593 B
PHP
<?php
|
|
|
|
use App\Models\Server;
|
|
|
|
it('builds the sslip.io domain from the IP address of the server', function (string $address, string $expected) {
|
|
$server = new Server(['ip' => $address]);
|
|
$server->id = 1;
|
|
|
|
expect(sslip($server))->toBe($expected);
|
|
})->with([
|
|
'IPv4' => ['188.245.12.182', 'http://188.245.12.182.sslip.io'],
|
|
'IPv6' => ['2a01:4f8:c016:bd23::1', 'http://2a01-4f8-c016-bd23--1.sslip.io'],
|
|
'resolvable hostname' => ['localhost', 'http://127.0.0.1.sslip.io'],
|
|
'unresolvable hostname' => ['coolify-test.invalid', 'http://coolify-test.invalid.sslip.io'],
|
|
]);
|