<?php

Reg::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) {
      \tts\exceptions\DB_Exception::customMessage($e);
    }
});