Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render

This commit is contained in:
2026-06-04 07:52:57 +02:00
parent 0b33a1b074
commit 15870ddb1f
191 changed files with 15453 additions and 1786 deletions

View File

@@ -0,0 +1,24 @@
<?php
declare(strict_types=1);
use App\Models\EnhanceJob;
use App\Services\Enhance\EnhanceProcessorFactory;
use App\Services\Enhance\Processors\ExternalWorkerEnhanceProcessor;
use App\Services\Enhance\Processors\StubEnhanceProcessor;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
uses(TestCase::class, RefreshDatabase::class);
it('returns the stub processor for the stub engine', function (): void {
expect(app(EnhanceProcessorFactory::class)->make(EnhanceJob::ENGINE_STUB))->toBeInstanceOf(StubEnhanceProcessor::class);
});
it('returns the external worker processor for the external worker engine', function (): void {
expect(app(EnhanceProcessorFactory::class)->make(EnhanceJob::ENGINE_EXTERNAL_WORKER))->toBeInstanceOf(ExternalWorkerEnhanceProcessor::class);
});
it('throws for an unknown enhance processor engine', function (): void {
app(EnhanceProcessorFactory::class)->make('unknown-engine');
})->throws(RuntimeException::class);