| @@ 146-151 (lines=6) @@ | ||
| 143 | $sql = 'SELECT name, value FROM s_plugin_connect_config WHERE shopId IS NULL AND groupName = ?'; |
|
| 144 | $result = Shopware()->Db()->fetchPairs($sql, ['export']); |
|
| 145 | ||
| 146 | foreach ($result as $name => $value) { |
|
| 147 | if (json_decode($value, true) !== null) { |
|
| 148 | $value = json_decode($value, true); |
|
| 149 | } |
|
| 150 | $this->assertEquals($value, $exportConfig[$name]); |
|
| 151 | } |
|
| 152 | } |
|
| 153 | ||
| 154 | public function testSetExportConfigs() |
|
| @@ 375-380 (lines=6) @@ | ||
| 372 | ||
| 373 | $result = Shopware()->Db()->fetchPairs($query); |
|
| 374 | ||
| 375 | foreach ($result as $key => $value) { |
|
| 376 | $decodedString = json_decode($value, true); |
|
| 377 | if ($decodedString !== null) { |
|
| 378 | $result[$key] = $decodedString; |
|
| 379 | } |
|
| 380 | } |
|
| 381 | ||
| 382 | return $result; |
|
| 383 | } |
|