assertNotEmpty($html, 'wiki:syntax must render to non-empty HTML');
// DOMWrap needs a single root; wrap in a container.
$doc = (new Document())->html('
' . $html . '
');
// Top-level heading from the page source: "====== Formatting Syntax ======"
$h1 = $doc->find('h1');
$this->assertSame(1, $h1->count(), 'page must have exactly one h1');
$this->assertSame('Formatting Syntax', trim($h1->text()));
// Headers of various levels — page has dozens of sections.
$this->assertGreaterThan(10, $doc->find('h2')->count(), 'page must have many h2 sections');
$this->assertGreaterThan(0, $doc->find('h3')->count());
$this->assertGreaterThan(0, $doc->find('h4')->count());
// Section edit markers — verifies finalize/Block ran.
$this->assertGreaterThan(
5,
substr_count($html, '