Update to Laravel 12

This commit is contained in:
Jonny Barnes 2025-04-01 21:08:17 +01:00
parent b30973d0fe
commit 736b0ea831
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
82 changed files with 683 additions and 720 deletions

View file

@ -8,6 +8,7 @@ use App\Jobs\SendWebMentions;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Queue;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;
use Tests\TestToken;
@ -18,9 +19,8 @@ class SwarmTest extends TestCase
/**
* Given a check in to Foursquare, this is the content Ownyourswarm will post to us.
*
* @test
*/
#[Test]
public function mockedOwnyourswarmRequestWithFoursquare(): void
{
Queue::fake();
@ -66,9 +66,8 @@ class SwarmTest extends TestCase
/**
* This request would actually come from another client than OwnYourSwarm, but were testing
* OpenStreetMap data.
*
* @test
*/
#[Test]
public function mockedOwnyourswarmRequestWithOsm(): void
{
Queue::fake();
@ -109,9 +108,8 @@ class SwarmTest extends TestCase
/**
* This request would actually come from another client than OwnYourSwarm, as that would include a Foursquare URL
*
* @test
*/
#[Test]
public function mockedOwnyourswarmRequestWithoutKnownExternalUrl(): void
{
Queue::fake();
@ -150,7 +148,7 @@ class SwarmTest extends TestCase
Queue::assertPushed(SendWebMentions::class);
}
/** @test */
#[Test]
public function mockedOwnyourswarmRequestWithNoTextContent(): void
{
$response = $this->json(
@ -187,7 +185,7 @@ class SwarmTest extends TestCase
$this->get($response->__get('headers')->get('location'))->assertSee('📍');
}
/** @test */
#[Test]
public function mockedOwnyourswarmRequestSavesJustThePostWhenAnErrorOccursInTheCheckinData(): void
{
Queue::fake();
@ -225,7 +223,7 @@ class SwarmTest extends TestCase
Queue::assertPushed(SendWebMentions::class);
}
/** @test */
#[Test]
public function mockedOwnyourswarmRequestWithHAdrLocation(): void
{
Queue::fake();
@ -271,7 +269,7 @@ class SwarmTest extends TestCase
Queue::assertPushed(SendWebMentions::class);
}
/** @test */
#[Test]
public function ownyourswarmCheckinTestUsingRealData(): void
{
$response = $this->json(