Skip to content

Commit 662c40c

Browse files
ci: Add test that themes appear in docs (#876)
* ci: Add test that themes appear in docs * style: Formatted code with Prettier --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 9192e27 commit 662c40c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/OptionsTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,22 @@ public function testThemes(): void
4444
}
4545
}
4646

47+
/**
48+
* Test that all themes appear in the documentation (docs/themes.md)
49+
*/
50+
public function testThemesInDocumentation(): void
51+
{
52+
$themes = include "src/themes.php";
53+
$docContent = file_get_contents("docs/themes.md");
54+
foreach (array_keys($themes) as $theme) {
55+
$this->assertStringContainsString(
56+
"`$theme`",
57+
$docContent,
58+
"The theme '$theme' is missing from the documentation (docs/themes.md).",
59+
);
60+
}
61+
}
62+
4763
/**
4864
* Test fallback to default theme
4965
*/

0 commit comments

Comments
 (0)