added tests and fixed leftover array entries
This commit is contained in:
33
tests/CsvxmlAvailableFieldsTest.php
Normal file
33
tests/CsvxmlAvailableFieldsTest.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?PHP
|
||||
/**
|
||||
* This script contains tests for the home page.
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@jrenslin.de>
|
||||
*/
|
||||
declare(strict_types = 1);
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
require_once __DIR__ . "/../functions/functions.php";
|
||||
|
||||
/**
|
||||
* Test class for the start page.
|
||||
*/
|
||||
final class CsvxmlAvailableFieldsTest extends TestCase {
|
||||
/**
|
||||
* Test for HTML output.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testOutput():void {
|
||||
|
||||
$fieldsGetter = new CsvxmlAvailableFields('en');
|
||||
$availableFields = $fieldsGetter->getFields();
|
||||
|
||||
foreach ($availableFields as $type) {
|
||||
foreach ($type as $name => $entry) {
|
||||
self::assertTrue($entry instanceof FieldEntry, $name . " is not a FieldEntry");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user