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:
ak
2026-08-12 01:15:38 +08:00
commit 263b98b218
337 changed files with 31393 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
<?php
declare(strict_types=1);
namespace Tests\Unit;
use App\Domain\Blog\ContentFormat;
use App\Domain\Blog\ContentRenderer;
use Tests\TestCase;
class ContentTocTest extends TestCase
{
public function test_markdown_headings_produce_toc_and_ids(): void
{
$markdown = <<<'MD'
Intro paragraph.
## First Section
Hello.
### Nested
More.
## Second Section
End.
MD;
$result = app(ContentRenderer::class)->render($markdown, ContentFormat::MARKDOWN);
$this->assertCount(3, $result['toc']);
$this->assertSame('First Section', $result['toc'][0]['text']);
$this->assertSame(2, $result['toc'][0]['level']);
$this->assertSame('Nested', $result['toc'][1]['text']);
$this->assertSame(3, $result['toc'][1]['level']);
$this->assertStringContainsString('id="', $result['html']);
$this->assertStringContainsString($result['toc'][0]['id'], $result['html']);
}
}