fixture = Yii::app()->getComponent('fixture'); $this->fixture->basePath = Yii::getPathOfAlias($alias.'.tests.fixtures'); $this->fixture->init(); $tables = explode(',', $tables); foreach ($tables as $table) { try { $this->fixture->resetTable($table); $this->fixture->loadFixture($table); } catch (Exception $e) { echo "ERROR: There is a problem working with the table $table. ". "Is it spelled correctly or exist?\n\n"; } } echo "Done.\n\n"; } }