Esempio n. 1
0
 /**
  * @param  RecordManager $rm
  * @param  array         $tableRows
  * @param  array         $tableMapFields
  * @return RecordGenerator
  */
 protected static function saveTableRows(RecordManager $rm, array $tableRows = null, array $tableMapFields = null)
 {
     if ($tableRows === null) {
         $tableRows = TableRowsProvider::provideTableRows();
     }
     if ($tableMapFields === null) {
         $tableMapFields = TableRowsProvider::provideTableMapFields();
     }
     $fvGenerator = new FieldValuesGenerator();
     $recordGenerator = new RecordGenerator($rm, $fvGenerator);
     $recordGenerator->setTablesRows($tableRows);
     $recordGenerator->setTablesMapField($tableMapFields);
     $recordGenerator->generate();
     return $recordGenerator;
 }
Esempio n. 2
0
 /**
  * @param array $tablesRows
  * @param array $tablesMappingField
  */
 private function givenTablesRows(array $tablesRows, array $tablesMappingField)
 {
     $this->recordGenerator->setTablesRows($tablesRows);
     $this->recordGenerator->setTablesMapField($tablesMappingField);
 }