| Conditions | 1 |
| Paths | 1 |
| Total Lines | 14 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function testSqlFailure(): void |
||
| 32 | { |
||
| 33 | $globalConfig_input = [ |
||
| 34 | 'store.type' => 'sql', |
||
| 35 | 'store.sql.dsn' => 'somenonexistingfile', |
||
| 36 | ]; |
||
| 37 | |||
| 38 | $globalConfig = \SimpleSAML\Configuration::loadFromArray($globalConfig_input); |
||
| 39 | \SimpleSAML\Configuration::setPreLoadedConfig($globalConfig, 'config.php'); |
||
| 40 | $testData = new TestData(['host' => 'test.localhost']); |
||
| 41 | |||
| 42 | $test = new Sql($testData); |
||
| 43 | $testResult = $test->getTestResult(); |
||
| 44 | $this->assertEquals(State::FATAL, $testResult->getState()); |
||
| 45 | } |
||
| 47 |