Conditions | 2 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
34 | public function invokeTest(): void |
||
35 | { |
||
36 | $testResult = new TestResult('SQL Server Health', $this->host); |
||
37 | |||
38 | try { |
||
39 | new Store\SQLStore(); |
||
40 | $testResult->setState(State::OK); |
||
41 | $testResult->setMessage('Connection to the database succesfully established'); |
||
42 | } catch (Exception $e) { |
||
43 | $testResult->setState(State::FATAL); |
||
44 | $testResult->setMessage('Unable to connect to the database; ' . $e->getMessage()); |
||
45 | } |
||
46 | |||
47 | $this->setTestResult($testResult); |
||
48 | } |
||
50 |