- Added standard Laravel directory structure and configuration. - Included Svelte and Tailwind configuration for the admin interface. - Added core PHPUnit and testing scripts.
32 lines
642 B
PHP
32 lines
642 B
PHP
<?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);
|
|
}
|
|
}
|