| Conditions | 1 |
| Paths | 1 |
| Total Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public static function createHandler(array $config) |
||
| 22 | { |
||
| 23 | // Generate a new db file on every method call to prevent |
||
| 24 | // a "Database schema has changed" error which occurs if any |
||
| 25 | // other process (e.g. worker) is still using the old db file. |
||
| 26 | // We also can't use the shared cache mode due to |
||
| 27 | // @link http://stackoverflow.com/questions/9150319/enable-shared-pager-cache-in-sqlite-using-php-pdo |
||
| 28 | |||
| 29 | return new PdoHandler([ |
||
| 30 | 'dsn' => sprintf('sqlite:%s/%s.sq3', sys_get_temp_dir(), uniqid('phive_tests_')), |
||
| 31 | 'username' => null, |
||
| 32 | 'password' => null, |
||
| 33 | 'table_name' => 'queue', |
||
| 34 | ]); |
||
| 35 | } |
||
| 36 | } |
||
| 37 |