cms/tests/Feature/ExampleTest.php

32 lines
642 B
PHP
Raw Permalink Normal View History

<?php
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
use App\Models\Page;
use App\Models\User;
class ExampleTest extends TestCase
{
use RefreshDatabase;
/**
* A basic test example.
*/
public function test_the_application_returns_a_successful_response(): void
{
Page::create([
'title' => 'Home',
'slug' => 'home',
'content' => [],
'is_published' => true,
'user_id' => User::factory()->create()->id,
]);
$response = $this->get('/');
$response->assertStatus(200);
}
}