1 | <?php |
||
26 | class SelfTest |
||
27 | { |
||
28 | /** |
||
29 | * The registered self tests. |
||
30 | * |
||
31 | * @var AbstractSelfTest[] |
||
32 | */ |
||
33 | private $tests = []; |
||
34 | |||
35 | /** |
||
36 | * The auto configuration. |
||
37 | * |
||
38 | * @var AutoConfig |
||
39 | */ |
||
40 | private $config; |
||
41 | |||
42 | /** |
||
43 | * Create a new instance. |
||
44 | */ |
||
45 | public function __construct() |
||
49 | |||
50 | /** |
||
51 | * Run all tests and return the results as an error array. |
||
52 | * |
||
53 | * @return SelfTestResult[] |
||
54 | */ |
||
55 | public function perform() |
||
65 | |||
66 | /** |
||
67 | * Add a test instance to the list of tests to perform. |
||
68 | * |
||
69 | * @param AbstractSelfTest $test The test to add. |
||
70 | * |
||
71 | * @return void |
||
72 | */ |
||
73 | public function addTest(AbstractSelfTest $test) |
||
77 | |||
78 | /** |
||
79 | * Retrieve the auto config. |
||
80 | * |
||
81 | * @return AutoConfig |
||
82 | */ |
||
83 | public function getAutoConfig() |
||
87 | } |
||
88 |