diff --git a/.gitignore b/.gitignore index 5112f1d..e0ee4a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ /csv +/composer.lock /translation-importer /values/langfiles *.swp *.swo commonservices +/vendor/ /xml +.phpunit.result.cache diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..cbadbc6 --- /dev/null +++ b/composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "phpunit/phpunit": "^8.4" + } +} diff --git a/index.php b/index.php index f31fe66..da6d05f 100644 --- a/index.php +++ b/index.php @@ -79,7 +79,7 @@ foreach ($availableFields as $headline => $fields) { echo "
  • + */ +declare(strict_types=1); + +// phpcs:disable + +use PHPUnit\Framework\TestCase; + +final class StartPageLoadsTest extends TestCase { + + public function testHTMLOutput():void { + + ob_start(); + include __DIR__ . "/../index.php"; + $output = $this->getActualOutput(); + + $this->assertEquals( + true, + is_string($output) + ); + + ob_clean(); + + } + +} diff --git a/tests/config.xml b/tests/config.xml new file mode 100644 index 0000000..b828b98 --- /dev/null +++ b/tests/config.xml @@ -0,0 +1,37 @@ + + + + ../home/ + ../inc/ + + + + +