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'); + } +}