コード例 #1
0
ファイル: Factory.php プロジェクト: ddinchev/yii-factory-girl
 /**
  * Clean up the database records created by calling Factory->create()
  * Should be called in tearDown() method in tests to avoid side effects.
  */
 public function flush()
 {
     $factoryData = $this->loadFactoryData();
     foreach ($factoryData as $className => $factory) {
         $this->resetTable($factory->tableName);
     }
     Sequence::resetAll();
 }