/** * @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; }
private function whenGeneratingRecords() { $this->recordGenerator->generate(); }