Move public files to /public subdirectory
phpcs-errors:221 phpunit-status:successful phpstan-errors:0
This commit is contained in:
33
tests/csvTest.php
Normal file
33
tests/csvTest.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);
|
||||
|
||||
// phpcs:disable
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Test class for the start page.
|
||||
*/
|
||||
final class CsvTest extends TestCase {
|
||||
|
||||
/**
|
||||
* Test for HTML output.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testHTMLOutput():void {
|
||||
|
||||
include __DIR__ . "/../public/csv.php";
|
||||
$output = $this->getActualOutput();
|
||||
|
||||
self::assertIsString($output);
|
||||
ob_clean();
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -4,24 +4,28 @@
|
||||
*
|
||||
* @author Joshua Ramon Enslin <joshua@jrenslin.de>
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
declare(strict_types = 1);
|
||||
|
||||
// phpcs:disable
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* Test class for the start page.
|
||||
*/
|
||||
final class StartPageTest extends TestCase {
|
||||
|
||||
/**
|
||||
* Test for HTML output.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testHTMLOutput():void {
|
||||
|
||||
include __DIR__ . "/../index.php";
|
||||
include __DIR__ . "/../public/index.php";
|
||||
$output = $this->getActualOutput();
|
||||
|
||||
self::assertEquals(
|
||||
true,
|
||||
is_string($output)
|
||||
);
|
||||
|
||||
self::assertIsString($output);
|
||||
ob_clean();
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user