Allow heading tags (h1-h6) in ContentSanitizer so news editor headings render
This commit is contained in:
24
tests/Unit/Enhance/EnhanceProcessorFactoryTest.php
Normal file
24
tests/Unit/Enhance/EnhanceProcessorFactoryTest.php
Normal 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);
|
||||
Reference in New Issue
Block a user