| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function testSqlSuccess(): void |
||
| 15 | { |
||
| 16 | $globalConfig_input = [ |
||
| 17 | 'store.type' => 'sql', |
||
| 18 | 'store.sql.dsn' => 'sqlite:/tmp/test.sqlite', |
||
| 19 | ]; |
||
| 20 | |||
| 21 | $globalConfig = \SimpleSAML\Configuration::loadFromArray($globalConfig_input); |
||
| 22 | \SimpleSAML\Configuration::setPreLoadedConfig($globalConfig, 'config.php'); |
||
| 23 | $testData = new TestData(['host' => 'test.localhost']); |
||
| 24 | |||
| 25 | $test = new Sql($testData); |
||
| 26 | $testResult = $test->getTestResult(); |
||
| 27 | $this->assertEquals(State::OK, $testResult->getState()); |
||
| 28 | unlink('/tmp/test.sqlite'); |
||
| 29 | } |
||
| 47 |