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.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?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']);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user