25 lines
544 B
PHP
25 lines
544 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
declare(strict_types=1);
|
||
|
|
|
||
|
|
use App\Models\Page;
|
||
|
|
use Database\Seeders\ContentSeeder;
|
||
|
|
use Illuminate\Support\Facades\View;
|
||
|
|
|
||
|
|
describe('HomeController', function () {
|
||
|
|
it('can access home page', function () {
|
||
|
|
// GIVEN
|
||
|
|
$this->seed(ContentSeeder::class);
|
||
|
|
View::share('PageList', Page::getCached()
|
||
|
|
->mapWithKeys(fn ($page) => [
|
||
|
|
$page->slug->value() => $page,
|
||
|
|
]));
|
||
|
|
|
||
|
|
// WHEN
|
||
|
|
$response = $this->get('/');
|
||
|
|
|
||
|
|
// THEN
|
||
|
|
$response->assertOk();
|
||
|
|
});
|
||
|
|
});
|