/** * Get pattern instance * * @return \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern */ protected function getPattern() { if (!$this->_pattern instanceof \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern) { $patternData = array(array('id' => '%s', 'name' => 'Static', 'calculated' => function ($index) { return $index * 10; }), array('name' => 'xxx %s'), array('name' => 'yyy %s')); $this->_pattern = new \Magento\TestFramework\ImportExport\Fixture\Complex\Pattern(); $this->_pattern->setHeaders(array_keys($patternData[0])); $this->_pattern->setRowsSet($patternData); } return $this->_pattern; }
/** * Get next row in set * * @return array|bool */ protected function _getNextRow() { $key = $this->key(); $this->_index = $this->getIndex($key); if ($key > $this->_limit) { return false; } return $this->_pattern->getRow($this->_index, $key); }