public function testGetTableNameWithPrefix() { $this->setConnection(); $modelEntity = ['modelEntity', 'tableSuffix']; $expected = 'tablename'; $tablePrefix = 'tablePrefix'; $this->_resorce->setTablePrefix($tablePrefix); $this->_connection->expects($this->once())->method('getTableName')->with($tablePrefix . $modelEntity[0] . '_' . $modelEntity[1])->will($this->returnValue($expected)); $this->assertEquals($expected, $this->_resorce->getTableName($modelEntity)); }
/** * Installation config data * * @param array $data * @return $this */ public function installConfig($data) { $data['db_active'] = true; $data = $this->_installerDb->checkDbConnectionData($data); $this->_installerConfig->setConfigData($data)->install(); $this->_arguments->reload(); $this->_resource->setTablePrefix($data['db_prefix']); $this->_config->reinit(); return $this; }