Files
larablog/tests/Unit/ThemeSlotReportTest.php
T
ak 263b98b218 Initial baseline: LaraBlog core with plugin commerce surface.
Captures the current working tree after theme slots, ArticleAccess, and the payment / paid-content plugins so subsequent work has a reviewable git history.
2026-08-12 01:15:38 +08:00

36 lines
1.0 KiB
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit;
use App\Domain\Theme\ThemeManager;
use App\Domain\Theme\ThemeSlot;
use App\Domain\Theme\ThemeSlotReport;
use Tests\TestCase;
class ThemeSlotReportTest extends TestCase
{
public function test_star_declares_all_standard_slots(): void
{
$this->assertSame(ThemeSlot::all(), ThemeSlotReport::normalizeDeclared('*'));
}
public function test_default_and_example_themes_report_full(): void
{
$manager = app(ThemeManager::class);
foreach (['default', 'example'] as $slug) {
$report = $manager->slotReport($slug);
$this->assertSame('full', $report['status'], $slug.' should be full: '.json_encode($report));
$this->assertSame([], $report['missing_standard']);
}
}
public function test_undeclared_manifest_status(): void
{
$report = ThemeSlotReport::analyze('tmp', [], base_path('themes/default'));
$this->assertSame('undeclared', $report['status']);
}
}