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