Update Laravel to v12
Some checks failed
PHP Unit / PHPUnit test suite (pull_request) Has been cancelled
Laravel Pint / Laravel Pint (pull_request) Has been cancelled

This commit is contained in:
Jonny Barnes 2025-03-01 15:00:41 +00:00
parent f2025b801b
commit 1dfa17abca
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
83 changed files with 1324 additions and 2323 deletions

View file

@ -6,6 +6,7 @@ namespace Tests\Feature;
use App\Models\Note;
use Illuminate\Foundation\Testing\RefreshDatabase;
use PHPUnit\Framework\Attributes\Test;
use Tests\TestCase;
class NotesControllerTest extends TestCase
@ -15,9 +16,8 @@ class NotesControllerTest extends TestCase
/**
* Test the `/notes` page returns 200, this should
* mean the database is being hit.
*
* @test
*/
#[Test]
public function notesPageLoads(): void
{
$response = $this->get('/notes');
@ -26,9 +26,8 @@ class NotesControllerTest extends TestCase
/**
* Test a specific note.
*
* @test
*/
#[Test]
public function specificNotePageLoads(): void
{
$note = Note::factory()->create();
@ -46,9 +45,8 @@ class NotesControllerTest extends TestCase
/**
* Test that `/note/{decID}` redirects to `/notes/{nb60id}`.
*
* @test
*/
#[Test]
public function oldNoteUrlsRedirect(): void
{
$note = Note::factory()->create();
@ -58,23 +56,22 @@ class NotesControllerTest extends TestCase
/**
* Visit the tagged page and check the tag view data.
*
* @test
*/
#[Test]
public function taggedNotesPageLoads(): void
{
$response = $this->get('/notes/tagged/beer');
$response->assertViewHas('tag', 'beer');
}
/** @test */
#[Test]
public function unknownNoteGives404(): void
{
$response = $this->get('/notes/112233');
$response->assertNotFound();
}
/** @test */
#[Test]
public function checkNoteIdNotOutOfRange(): void
{
$response = $this->get('/notes/photou-photologo');