-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
32 lines (25 loc) · 862 Bytes
/
index.php
File metadata and controls
32 lines (25 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
error_reporting(E_ERROR ^ E_PARSE);
ini_set('display_errors', 'On');
use helpers\DebugHelper;
use tests\StaticTest;
use tests\InheritanceTest;
use tests\TestManager;
use tests\testClasses\TestClass1;
use tests\testClasses\TestClass2;
spl_autoload_register(function ($class) {
$className = end(explode("\\", $class));
switch ($class) {
case strstr($class, 'helpers') != FALSE:
include "helpers/$className.php";
break;
case strstr($class, 'testClasses') != FALSE:
include "tests/test_classes/$className.php";
break;
case strstr($class, 'tests') != FALSE:
include "tests/$className.php";
break;
}
});
(new TestManager(new StaticTest(new TestClass1())))->runTests();
(new TestManager(new InheritanceTest(new TestClass2())))->runTests();