Make test.php work without external help

This commit is contained in:
Nero 2019-08-15 19:45:20 +00:00
parent 6a4b00086b
commit f6b49ba451

View File

@ -1,4 +1,21 @@
<?php
// Increase verbosity
error_reporting(E_ALL);
ini_set("display_errors",1);
// All notices and warnings shall be fatal
set_error_handler("onError");
function onError($severity, $message, $file, $line) {
throw new ErrorException($message, 0, $severity, $file, $line);
}
// Autoload classes if available
spl_autoload_register(function ($class_name) {
include(str_replace('Post\\','',$class_name).'.php');
});
session_start();
$form = new Post\Form(array(
"string" => new Post\FormField(),
"secret" => new Post\SecretFormField(),