/**
  * @param string $tableName
  */
 public function resetTable($tableName)
 {
     parent::resetTable($tableName);
     $version_table = "{$tableName}_version";
     if ($this->dbConnection->schema->getTable($version_table)) {
         $this->truncateTable($version_table);
     }
 }
示例#2
0
 public function init()
 {
     parent::init();
     foreach (Yii::app()->moduleManager->getInstalledModules(true, false) as $moduleId => $module) {
         $moduleFixturePath = $module->getPath() . DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR . 'fixtures';
         if (is_dir($moduleFixturePath)) {
             $this->moduleBasePaths[] = $moduleFixturePath;
             $this->prepareModule($moduleFixturePath);
         }
     }
 }
示例#3
0
 public function prepare()
 {
     if ($this->loadFixtures) {
         parent::prepare();
     }
 }
 public function prepare()
 {
     echo '11|';
     parent::prepare();
 }