public function testGetGroupTotals() { $section = 'config'; $group = 'payment'; $expected = ['test data']; $path = $section . '/' . $group; $this->configDataMock->expects($this->once())->method('get')->with($this->equalTo($path))->will($this->returnValue($expected)); $result = $this->model->getGroupTotals($section, $group); $this->assertEquals($expected, $result); }
/** * Initialize total models configuration and objects * * @return $this */ protected function _initModels() { $totals = $this->_salesConfig->getGroupTotals($this->_configSection, $this->_configGroup); foreach ($totals as $totalCode => $totalConfig) { $class = $totalConfig['instance']; if (!empty($class)) { $this->_models[$totalCode] = $this->_initModelInstance($class, $totalCode, $totalConfig); } } return $this; }