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,33 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Unit;
|
||||
|
||||
use App\Domain\Cms\Blocks\BlockRegistry;
|
||||
use Illuminate\Validation\ValidationException;
|
||||
use Tests\TestCase;
|
||||
|
||||
class BlockRegistryTest extends TestCase
|
||||
{
|
||||
public function test_image_text_requires_an_alternative_text(): void
|
||||
{
|
||||
$this->expectException(ValidationException::class);
|
||||
|
||||
app(BlockRegistry::class)->normalize([
|
||||
['type' => 'image_text', 'body' => 'Text', 'image' => 'cms/bild.jpg'],
|
||||
]);
|
||||
}
|
||||
|
||||
public function test_action_links_reject_script_urls(): void
|
||||
{
|
||||
$this->expectException(ValidationException::class);
|
||||
|
||||
app(BlockRegistry::class)->normalize([
|
||||
[
|
||||
'type' => 'call_to_action',
|
||||
'heading' => 'Weiter',
|
||||
'label' => 'Öffnen',
|
||||
'url' => 'javascript:alert(1)',
|
||||
],
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user