From c1fdd37b2b3d6d6cc5894909ff6104e446cfb51e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20H=C3=A4fliger?= Date: Thu, 10 Sep 2026 08:02:59 +0000 Subject: [PATCH] Entwurf: tests/DokumentationsstrukturTest.php --- tests/DokumentationsstrukturTest.php | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 tests/DokumentationsstrukturTest.php diff --git a/tests/DokumentationsstrukturTest.php b/tests/DokumentationsstrukturTest.php new file mode 100644 index 0000000..b609cec --- /dev/null +++ b/tests/DokumentationsstrukturTest.php @@ -0,0 +1,45 @@ + */ + public function modulReadmes(): array + { + return [ + 'Manager', + 'Batterie', + 'Wassererwaermer', + 'Pufferspeicher', + 'Verbraucher-1-Stufig', + 'Waermepumpe', + 'Ladestation-Stand-Alone', + 'Ladestation-Gateway', + 'Easee-Gateway', + ]; + } + + /** @dataProvider modulReadmes */ + public function testJederModulentwurfHatEinReadme(string $modul): void + { + $pfad = __DIR__ . '/../docs/module/' . $modul . '/README.md'; + self::assertFileExists($pfad); + + $inhalt = file_get_contents($pfad); + self::assertNotFalse($inhalt); + self::assertStringContainsString('Status: Diskussionsentwurf', $inhalt); + self::assertStringContainsString('Properties', $inhalt); + } + + public function testSchnittstellenDokumentiertSind(): void + { + self::assertFileExists(__DIR__ . '/../docs/Schnittstelle.md'); + self::assertFileExists(__DIR__ . '/../docs/Obere-Anschluesse.md'); + self::assertFileExists(__DIR__ . '/../libs/VerbraucherBasisTrait.php'); + } +}