/**
  * @inheritdoc
  */
 public function install()
 {
     $engine = $this->db->getParameter('engine');
     $collate = $this->db->getParameter('collate');
     $charset = $this->db->getParameter('charset');
     $this->db->exec("\n            CREATE TABLE IF NOT EXISTS `" . $this->tableName . "` (\n            `id` int(11) NOT NULL AUTO_INCREMENT,\n            `name` varchar(150) NOT NULL DEFAULT '',\n            PRIMARY KEY (`id`),\n            UNIQUE KEY by_name (`name`)\n            ) ENGINE={$engine} DEFAULT CHARSET={$charset} COLLATE={$collate}");
     $this->metaFactory->createTable();
 }
Exemple #2
0
 public static function setUpBeforeClass()
 {
     parent::setUpBeforeClass();
     self::$f = new \Rocker\Object\ObjectMetaFactory('testCaseMeta', self::$db, new \Rocker\Cache\TempMemoryCache());
     self::$f->createTable();
 }