public function populateTable($table, $records = null)
{
// Empty the table first
$this->emptyTable($table);
$connection = $this->di->get('db');
$parts = explode('_', $table);
$suffix = '';
foreach ($parts as $part) {
$suffix .= ucfirst($part);
}
$class = 'Phalcon\\Test\\Fixtures\\' . $suffix;
$data = $class::get($records);
foreach ($data as $record) {
$sql = "INSERT INTO {$table} VALUES " . $record;
$connection->execute($sql);
}
}