<?php

declare(strict_types=1);

\main_tts\registry::get('di')->register('db_mocker', function($args) {    
    try {
      $conn = new \PDO('sqlite::memory:');
      // set the PDO error mode to exception
      $conn->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
      return $conn;
    } catch (\PDOException $e) {
      echo $e->getMessage();
    } catch (\Exception $e) {
      echo $e->getMessage();
    }
});