mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-06 12:38:40 +00:00
fix tests
This commit is contained in:
parent
513a1df1dc
commit
1ca15ebbfa
|
|
@ -166,7 +166,7 @@ class CsvDatabaseMapper implements IODatabaseMapper
|
||||||
// update data
|
// update data
|
||||||
while (($cells = \fgetcsv($fp)) !== false) {
|
while (($cells = \fgetcsv($fp)) !== false) {
|
||||||
$query = new Builder($this->con);
|
$query = new Builder($this->con);
|
||||||
$query->update($titles)->into($table);
|
$query->update(...$titles)->into($table);
|
||||||
|
|
||||||
for ($j = 2; $j <= $columns; ++$j) {
|
for ($j = 2; $j <= $columns; ++$j) {
|
||||||
$query->sets((string) $titles[$j - 2], $cells[$j - 1]);
|
$query->sets((string) $titles[$j - 2], $cells[$j - 1]);
|
||||||
|
|
|
||||||
|
|
@ -221,7 +221,7 @@ class SpreadsheetDatabaseMapper implements IODatabaseMapper
|
||||||
$line = 2;
|
$line = 2;
|
||||||
while (!empty($workSheet->getCell('A' . $line)->getCalculatedValue())) {
|
while (!empty($workSheet->getCell('A' . $line)->getCalculatedValue())) {
|
||||||
$query = new Builder($this->con);
|
$query = new Builder($this->con);
|
||||||
$query->update($titles)->into($table);
|
$query->update(...$titles)->into($table);
|
||||||
|
|
||||||
for ($j = 2; $j <= $columns; ++$j) {
|
for ($j = 2; $j <= $columns; ++$j) {
|
||||||
$query->sets((string) $titles[$j - 2], $workSheet->getCell(StringUtils::intToAlphabet($j) . $line)->getCalculatedValue());
|
$query->sets((string) $titles[$j - 2], $workSheet->getCell(StringUtils::intToAlphabet($j) . $line)->getCalculatedValue());
|
||||||
|
|
|
||||||
|
|
@ -7,13 +7,8 @@ declare(strict_types=1);
|
||||||
\error_reporting(\E_ALL);
|
\error_reporting(\E_ALL);
|
||||||
\setlocale(\LC_ALL, 'en_US.UTF-8');
|
\setlocale(\LC_ALL, 'en_US.UTF-8');
|
||||||
|
|
||||||
if (\is_file('vendor/autoload.php')) {
|
require_once __DIR__ . '/../vendor/autoload.php';
|
||||||
include_once __DIR__ . '/vendor/autoload.php';
|
require_once __DIR__ . '/Autoloader.php';
|
||||||
} elseif (\is_file('../../vendor/autoload.php')) {
|
|
||||||
include_once __DIR__ . '/../../vendor/autoload.php';
|
|
||||||
}
|
|
||||||
|
|
||||||
require_once __DIR__ . '/../Autoloader.php';
|
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user