* Fix CI/CD php version

* Add Pint
* Format code
This commit is contained in:
Fabián Gonzalo Artur de la Villarmois
2026-03-29 17:49:51 +13:00
parent 0993bfa666
commit bae79d68ab
17 changed files with 114 additions and 59 deletions
@@ -106,7 +106,7 @@ test('DBI user-agent receives relative links', function () {
$response = $this->get('/api/dbi/', ['HTTP_USER_AGENT' => 'DBI/1.0']);
// DBI clients need a relative href like "GameA/" not an absolute path
$response->assertSee('href="' . rawurlencode('GameA') . '/"', false);
$response->assertSee('href="'.rawurlencode('GameA').'/"', false);
});
test('browser user-agent receives absolute links', function () {
@@ -114,7 +114,7 @@ test('browser user-agent receives absolute links', function () {
$response = $this->get('/api/dbi/');
$response->assertSee('href="/api/dbi/' . rawurlencode('GameA') . '"', false);
$response->assertSee('href="/api/dbi/'.rawurlencode('GameA').'"', false);
});
test('displays the current subdirectory path in the page title', function () {
@@ -47,7 +47,7 @@ test('only includes files with supported Nintendo Switch extensions', function (
$files = collect($response->json('files'));
expect($files)->toHaveCount(4);
expect($files->pluck('url')->every(fn ($url) => !str_ends_with($url, '.txt') && !str_ends_with($url, '.jpg')))->toBeTrue();
expect($files->pluck('url')->every(fn ($url) => ! str_ends_with($url, '.txt') && ! str_ends_with($url, '.jpg')))->toBeTrue();
});
test('file url is an absolute URL', function () {
+3 -1
View File
@@ -1,5 +1,7 @@
<?php
use Tests\TestCase;
/*
|--------------------------------------------------------------------------
| Test Case
@@ -11,7 +13,7 @@
|
*/
pest()->extend(Tests\TestCase::class)
pest()->extend(TestCase::class)
// ->use(Illuminate\Foundation\Testing\RefreshDatabase::class)
->in('Feature');