Stelle das U0-Fundament mit CMS, Mitgliedern und Filament bereit.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
89b35ac480
commit
2035c46edd
130 files changed
+18519
-50
No files matched your search
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature;
|
||||
|
||||
use App\Domain\Cms\Page;
|
||||
use Illuminate\Database\QueryException;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
class PublicPageTest extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
|
||||
public function test_home_page_is_published_from_the_cms(): void
|
||||
{
|
||||
$response = $this->get('/');
|
||||
|
||||
$response->assertOk();
|
||||
$response->assertSee('Lara & Felix', false);
|
||||
$response->assertSee('Stark im Alltag');
|
||||
$response->assertSee('Anmelden');
|
||||
$response->assertSee('href="'.route('login').'"', false);
|
||||
$response->assertDontSee('/verwaltung');
|
||||
}
|
||||
|
||||
public function test_known_pages_and_sitemap_are_available(): void
|
||||
{
|
||||
$this->get('/praevention')->assertOk()->assertSee('Prävention im Alltag');
|
||||
$this->get('/angebote')->assertOk()->assertDontSee('€');
|
||||
$this->get('/sitemap.xml')->assertOk()->assertSee(url('/praevention'), false);
|
||||
}
|
||||
|
||||
public function test_missing_page_is_not_found(): void
|
||||
{
|
||||
$this->get('/gibt-es-nicht')->assertNotFound();
|
||||
}
|
||||
|
||||
public function test_page_paths_are_unique(): void
|
||||
{
|
||||
$this->expectException(QueryException::class);
|
||||
|
||||
Page::query()->create(['path' => '/']);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user