public function setUp()
 {
     $this->di = new \Phalcon\DI\FactoryDefault();
     $this->di->setShared('db', function () {
         $db = new TestDatabase();
         $db->cleanUp();
         $db->constructUsers();
         return $db;
     });
     $this->di->setShared('session', function () {
         $adapter = new TestSession();
         $adapter->start();
         return $adapter;
     });
     $this->di->set('auth', new \AD\Auth\Security\Auth(new \Phalcon\Config(array('session_key' => 'testkey', 'hash_key' => 'hashkey', 'hash_method' => 'sha256')), '\\TestUser'));
     \Phalcon\DI::setDefault($this->di);
 }
 /**
  * Test create mapped SQL using map.
  */
 public function testCreateMappedMapSQL()
 {
     $map = array();
     $map['name'] = 'foo5';
     $map['className'] = 'class5';
     $map['methodName'] = 'method5';
     $map['parameterList'] = '';
     $this->registerTableMapping();
     $sql = "INSERT INTO %table.create_update_tests%\n                (name, class_name, method_name, parameter_list) VALUES\n                (:name, :className, :methodName, :parameterList)";
     foreach (TestDatabase::getProviders() as $provider => $database) {
         $database->updateObj($sql, $map, 'create_update_tests');
     }
 }