1 | <?php |
||
29 | class SelfTest |
||
30 | { |
||
31 | /** |
||
32 | * The registered self tests. |
||
33 | * |
||
34 | * @var AbstractSelfTest[] |
||
35 | */ |
||
36 | private $tests = []; |
||
37 | |||
38 | /** |
||
39 | * The auto configuration. |
||
40 | * |
||
41 | * @var TensideJsonConfig |
||
42 | */ |
||
43 | private $config; |
||
44 | |||
45 | /** |
||
46 | * Create a new instance. |
||
47 | */ |
||
48 | public function __construct() |
||
52 | |||
53 | /** |
||
54 | * Run all tests and return the results as an error array. |
||
55 | * |
||
56 | * @return SelfTestResult[] |
||
57 | */ |
||
58 | public function perform() |
||
68 | |||
69 | /** |
||
70 | * Add a test instance to the list of tests to perform. |
||
71 | * |
||
72 | * @param AbstractSelfTest $test The test to add. |
||
73 | * |
||
74 | * @return void |
||
75 | */ |
||
76 | public function addTest(AbstractSelfTest $test) |
||
80 | |||
81 | /** |
||
82 | * Retrieve the auto config. |
||
83 | * |
||
84 | * @return TensideJsonConfig |
||
85 | */ |
||
86 | public function getAutoConfig() |
||
90 | } |
||
91 |